fix: forward ONECLI_API_KEY to OneCLI SDK for authenticated container config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ const envConfig = readEnvFile([
|
|||||||
'ASSISTANT_NAME',
|
'ASSISTANT_NAME',
|
||||||
'ASSISTANT_HAS_OWN_NUMBER',
|
'ASSISTANT_HAS_OWN_NUMBER',
|
||||||
'ONECLI_URL',
|
'ONECLI_URL',
|
||||||
|
'ONECLI_API_KEY',
|
||||||
'TZ',
|
'TZ',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -52,6 +53,8 @@ export const CONTAINER_MAX_OUTPUT_SIZE = parseInt(
|
|||||||
10,
|
10,
|
||||||
); // 10MB default
|
); // 10MB default
|
||||||
export const ONECLI_URL = process.env.ONECLI_URL || envConfig.ONECLI_URL;
|
export const ONECLI_URL = process.env.ONECLI_URL || envConfig.ONECLI_URL;
|
||||||
|
export const ONECLI_API_KEY =
|
||||||
|
process.env.ONECLI_API_KEY || envConfig.ONECLI_API_KEY;
|
||||||
export const MAX_MESSAGES_PER_PROMPT = Math.max(
|
export const MAX_MESSAGES_PER_PROMPT = Math.max(
|
||||||
1,
|
1,
|
||||||
parseInt(process.env.MAX_MESSAGES_PER_PROMPT || '10', 10) || 10,
|
parseInt(process.env.MAX_MESSAGES_PER_PROMPT || '10', 10) || 10,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {
|
|||||||
DATA_DIR,
|
DATA_DIR,
|
||||||
GROUPS_DIR,
|
GROUPS_DIR,
|
||||||
IDLE_TIMEOUT,
|
IDLE_TIMEOUT,
|
||||||
|
ONECLI_API_KEY,
|
||||||
ONECLI_URL,
|
ONECLI_URL,
|
||||||
TIMEZONE,
|
TIMEZONE,
|
||||||
} from './config.js';
|
} from './config.js';
|
||||||
@@ -28,7 +29,7 @@ import { OneCLI } from '@onecli-sh/sdk';
|
|||||||
import { validateAdditionalMounts } from './mount-security.js';
|
import { validateAdditionalMounts } from './mount-security.js';
|
||||||
import { RegisteredGroup } from './types.js';
|
import { RegisteredGroup } from './types.js';
|
||||||
|
|
||||||
const onecli = new OneCLI({ url: ONECLI_URL });
|
const onecli = new OneCLI({ url: ONECLI_URL, apiKey: ONECLI_API_KEY });
|
||||||
|
|
||||||
// Sentinel markers for robust output parsing (must match agent-runner)
|
// Sentinel markers for robust output parsing (must match agent-runner)
|
||||||
const OUTPUT_START_MARKER = '---NANOCLAW_OUTPUT_START---';
|
const OUTPUT_START_MARKER = '---NANOCLAW_OUTPUT_START---';
|
||||||
|
|||||||
Reference in New Issue
Block a user