@bakers-build/addon-grok 0.10.1-next.11 → 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.
@@ -11,6 +11,7 @@ export interface GrokAgentOptions extends SecurityOptions {
11
11
  export declare class GrokAgent implements BbAgent {
12
12
  private readonly home;
13
13
  readonly id = "grok";
14
+ readonly secretEnv: readonly ["XAI_API_KEY"];
14
15
  private readonly args;
15
16
  private readonly model;
16
17
  private readonly effort;
package/dist/src/index.js CHANGED
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
5
5
  import { resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, validateOptionalString, } from '@bakers-build/conductor/contract';
6
6
  import { shellQuote } from '@bakers-build/core';
7
7
  import { parseGrokTranscript } from './footprint.js';
8
- import { encodeGrokSessionCwd, prepareGrokRun } from './run.js';
8
+ import { encodeGrokSessionCwd, GROK_SECRET_ENV, prepareGrokRun, } from './run.js';
9
9
  export { parseGrokTranscript } from './footprint.js';
10
10
  export { encodeGrokSessionCwd } from './run.js';
11
11
  const GROK_RESERVED = ['--permission-mode', '--session-id', '-s'];
@@ -134,6 +134,7 @@ async function readJson(path) {
134
134
  export class GrokAgent {
135
135
  home;
136
136
  id = 'grok';
137
+ secretEnv = GROK_SECRET_ENV;
137
138
  args;
138
139
  model;
139
140
  effort;
@@ -428,6 +429,7 @@ export function grokAgent(options = {}) {
428
429
  id: 'grok',
429
430
  requiredModules: [],
430
431
  permissions: agent.security.report,
432
+ secretEnv: agent.secretEnv,
431
433
  async createAgent() {
432
434
  return agent;
433
435
  },
package/dist/src/run.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import type { AgentRunContext, AgentRunPreparation } from '@bakers-build/conductor/contract';
2
2
  export declare function encodeGrokSessionCwd(cwd: string): string;
3
+ /** The model credential a Grok run may receive from the secrets file. */
4
+ export declare const GROK_SECRET_ENV: readonly ["XAI_API_KEY"];
3
5
  /** Prepare Grok's files in the home supplied by any execution backend. */
4
6
  export declare function prepareGrokRun(context: AgentRunContext, grokHome: string, hostEnv?: Readonly<Record<string, string | undefined>>): AgentRunPreparation;
package/dist/src/run.js CHANGED
@@ -3,8 +3,11 @@ import { join } from 'node:path';
3
3
  export function encodeGrokSessionCwd(cwd) {
4
4
  return encodeURIComponent(cwd);
5
5
  }
6
+ /** The model credential a Grok run may receive from the secrets file. */
7
+ export const GROK_SECRET_ENV = ['XAI_API_KEY'];
6
8
  /** Prepare Grok's files in the home supplied by any execution backend. */
7
- export function prepareGrokRun(context, grokHome, hostEnv = process.env) {
9
+ export function prepareGrokRun(context, grokHome, hostEnv = context.secrets ??
10
+ process.env) {
8
11
  const home = join(context.homePath, '.grok');
9
12
  mkdirSync(join(home, 'sessions'), { recursive: true });
10
13
  // Writable copies: a managed launch writes its profile into sandbox.toml;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-grok",
3
- "version": "0.10.1-next.11",
3
+ "version": "0.10.1-next.12",
4
4
  "description": "bakers.build agent plugin for xAI Grok Build, with a real session footprint.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "directory": "bakers-cli/addons/grok"
23
23
  },
24
24
  "peerDependencies": {
25
- "@bakers-build/conductor": "^0.10.1-next.11",
26
- "@bakers-build/core": "^0.10.1-next.11"
25
+ "@bakers-build/conductor": "^0.10.1-next.12",
26
+ "@bakers-build/core": "^0.10.1-next.12"
27
27
  },
28
28
  "bakersBuild": {
29
- "commit": "a17110983f32ae027848c103b31ddb07fbf21a8e",
29
+ "commit": "460f5570442a0b09af52a1d4450b879075302e57",
30
30
  "channel": "next"
31
31
  }
32
32
  }