Full internal rename: metapi → boosapi
Rename all remaining internal protocol identifiers: - x-metapi-* headers → x-boosapi-* - metapi: reasoning prefix → boosapi: - __metapi* runtime markers → __boosapi* - file-metapi-* → file-boosapi-* - METAPI_* env vars → BOOSAPI_* - metapi_turn_state/metapi_mcp_item__ etc. → boosapi_* - package.json name → boosapi - Docker/deploy/k3s/docs references 46 files changed, 168 insertions, 170 deletions. typecheck:web passes (0 new errors). Signed-off-by: Boos4721 <boos4721@icloud.com>
This commit is contained in:
@@ -6,8 +6,8 @@ import { tokenRouter } from '../services/tokenRouter.js';
|
||||
|
||||
type SelectedChannel = Awaited<ReturnType<typeof tokenRouter.selectChannel>>;
|
||||
|
||||
export const TESTER_FORCED_CHANNEL_HEADER = 'x-metapi-tester-forced-channel-id';
|
||||
export const TESTER_REQUEST_HEADER = 'x-metapi-tester-request';
|
||||
export const TESTER_FORCED_CHANNEL_HEADER = 'x-boosapi-tester-forced-channel-id';
|
||||
export const TESTER_REQUEST_HEADER = 'x-boosapi-tester-request';
|
||||
|
||||
function headerValueEquals(
|
||||
headers: Record<string, unknown> | undefined,
|
||||
|
||||
@@ -54,7 +54,7 @@ function normalizeLowerCaseHeaderMap(
|
||||
}
|
||||
|
||||
export function uuidFromSeed(seed: string): string {
|
||||
const derived = pbkdf2Sync(seed, 'metapi-runtime-header-seed', 10_000, 16, 'sha256');
|
||||
const derived = pbkdf2Sync(seed, 'boosapi-runtime-header-seed', 10_000, 16, 'sha256');
|
||||
const bytes = new Uint8Array(derived);
|
||||
bytes[6] = (bytes[6]! & 0x0f) | 0x50;
|
||||
bytes[8] = (bytes[8]! & 0x3f) | 0x80;
|
||||
@@ -159,7 +159,7 @@ export function buildCodexRuntimeHeaders(input: {
|
||||
getInputHeader(input.baseHeaders, 'session_id')
|
||||
|| getInputHeader(input.baseHeaders, 'session-id')
|
||||
|| explicitSessionId
|
||||
|| (continuityKey ? uuidFromSeed(`metapi:codex:${continuityKey}`) : null)
|
||||
|| (continuityKey ? uuidFromSeed(`boosapi:codex:${continuityKey}`) : null)
|
||||
|| randomUUID()
|
||||
);
|
||||
const conversationId = (
|
||||
|
||||
@@ -124,7 +124,7 @@ function getCodexSessionHeaderValue(headers: Record<string, string>): string {
|
||||
}
|
||||
function isResponsesWebsocketTransportRequest(headers: Record<string, unknown>): boolean {
|
||||
return Object.entries(headers)
|
||||
.some(([rawKey, rawValue]) => rawKey.trim().toLowerCase() === 'x-metapi-responses-websocket-transport'
|
||||
.some(([rawKey, rawValue]) => rawKey.trim().toLowerCase() === 'x-boosapi-responses-websocket-transport'
|
||||
&& String(rawValue).trim() === '1');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user