模型通道:接管官方 API Key 通道指向弹匣网关(GLM-5.3 / GLM-5.3-Flash) 登录:浏览器取一次性接入码 → 换成员专属 key → 写入 DSH 凭据 工具面:MCP 暴露查汇总/查任务/查项目/建任务/完成/改期/whoami 面板:侧边栏入口,个人看板 + 角色可见范围 + 行内操作 离职吊销:成员停用即吊销名下全部 TDB key 发布配置:scope 包名、私有 registry 锁定、prepack 自动构建、prepublishOnly 检查
23 lines
1.3 KiB
JavaScript
23 lines
1.3 KiB
JavaScript
import { readFileSync } from 'node:fs'
|
|
import { homedir } from 'node:os'
|
|
import { join } from 'node:path'
|
|
const cfg = JSON.parse(readFileSync(join(homedir(), 'Documents/Essay_AI/Essay_system/dsh-markmag/.local-credentials.json'), 'utf8'))
|
|
const key = cfg.key1
|
|
const url = 'https://brain.sidaocai.cn/tdb-api/claude-code/default/v1/messages'
|
|
const candidates = ['glm-5.3', 'glm-5.3-flash', 'glm-5.3-flashx', 'deepseek-v4-pro', 'deepseek-flash', 'deepseek-chat', 'deepseek-v3', 'kimi-k2', 'qwen3-max']
|
|
for (const model of candidates) {
|
|
const t0 = Date.now()
|
|
try {
|
|
const res = await fetch(url, {
|
|
method: 'POST',
|
|
headers: { 'content-type': 'application/json', 'x-api-key': key, 'anthropic-version': '2023-06-01' },
|
|
body: JSON.stringify({ model, max_tokens: 8, messages: [{ role: 'user', content: 'hi' }] }),
|
|
signal: AbortSignal.timeout(30000),
|
|
})
|
|
const text = await res.text()
|
|
const ok = res.status === 200
|
|
const brief = ok ? 'OK' : (() => { try { const j = JSON.parse(text); return (j.error?.code || '') + ' ' + (j.error?.message || '').slice(0, 60) } catch { return text.slice(0, 60) } })()
|
|
console.log((ok ? '✅' : '❌'), model.padEnd(16), res.status, (Date.now() - t0) + 'ms', brief)
|
|
} catch (e) { console.log('❌', model.padEnd(16), 'FAIL', e.name) }
|
|
}
|