/**
* skill-core-guide · Browser bundle(无 Node 依赖)
* ---------------------------------------------------------------------------
* 本文件**不得** import 任何 node: 内置模块 —— 只使用 Web 标准 API
* (fetch / TextEncoder / URL / crypto.subtle 等),可直接被
*
*/
// ============================================================
// 平台常量(内联,保持浏览器 bundle 零依赖、可独立分发)
// ============================================================
export const VERSION = '1.0.3';
export const SKILL_NAME = 'skill-core-guide';
export const PLATFORM = {
name: 'Fmode Harness',
version: '1.0.0',
apiBase: 'https://api.fmode.cn',
gatewayBase: 'https://server.fmode.cn',
cdnBase: 'https://fmode.cn',
obsBase: 'https://fmode-s3.obs.cn-north-4.myhuaweicloud.com',
gogsBase: 'https://git.fmode.cn',
gogsOrg: 'fmode',
githubOrg: 'fmodecn',
npmRegistry: 'https://registry.npmjs.org',
skillhub: {
host: 'https://api.skillhub.cn',
team: 'fmode',
orgId: 'org-m8z913un',
},
};
export const ENDPOINTS = {
llmChat: {
id: 'llmChat',
method: 'POST',
url: 'https://api.fmode.cn/v1/chat/completions',
status: 'live',
auth: 'Bearer ',
purpose: 'LLM 对话补全(OpenAI 兼容)',
},
imageGenerate: {
id: 'imageGenerate',
method: 'POST',
url: 'https://api.fmode.cn/v1/images/generations',
status: 'live',
auth: 'Bearer ',
purpose: '图像生成',
},
listenTranscribe: {
id: 'listenTranscribe',
method: 'POST',
url: 'https://server.fmode.cn/api/listen/transcribe',
status: 'live',
auth: 'Bearer ',
purpose: '录音转写(讯飞 LFASR)',
},
vocSkillBootstrap: {
id: 'vocSkillBootstrap',
method: 'POST',
url: 'https://server.fmode.cn/api/fmode/voc-skill/install-prompt',
status: 'live',
auth: 'x-parse-session-token: ',
purpose: 'sessionToken → fmode API token 自举',
},
deploySts: {
id: 'deploySts',
method: 'POST',
url: 'https://server.fmode.cn/api/apig/deploy/huaweicloud',
status: 'live',
auth: 'Bearer ',
purpose: '签发项目隔离 OBS STS',
},
verifyCode: {
id: 'verifyCode',
method: 'POST',
url: 'https://server.fmode.cn/api/fmode/verifycode',
status: 'planned',
auth: '无',
purpose: '手机号验证码(未上线)',
},
};
export const RUNTIMES = {
cli: { key: 'cli', label: 'CLI', entry: 'bin/.mjs', usage: 'npx --yes @latest ', supported: true },
sdk: { key: 'sdk', label: 'SDK (Node ESM)', entry: 'lib/index.mjs', usage: "import { ... } from ''", supported: true },
browser: {
key: 'browser',
label: 'Browser',
entry: 'browser/index.mjs',
usage: '