mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 10:08:13 +00:00
* chore: remove verified dead code and calibrate Knip entries * fix: include mjs consumers in dead-code analysis
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import type { SecretAtRestProtection } from './secret-at-rest-protection'
|
|
|
|
/**
|
|
* GLM Coding Plan site table shared by the zcode credential store, the usage
|
|
* fetcher, and the Accounts settings section. The provider id stays `zcode`;
|
|
* the two sites are the international Z.AI console and Zhipu's mainland
|
|
* BigModel platform.
|
|
*/
|
|
export type ZcodePlanSite = 'zai' | 'bigmodel'
|
|
|
|
export const ZCODE_PLAN_SITE_BASE_URLS: Record<ZcodePlanSite, string> = {
|
|
zai: 'https://api.z.ai',
|
|
bigmodel: 'https://open.bigmodel.cn'
|
|
}
|
|
|
|
export const ZCODE_PLAN_SITE_CONSOLE_URLS: Record<ZcodePlanSite, string> = {
|
|
zai: 'https://z.ai/manage-apikey',
|
|
bigmodel: 'https://open.bigmodel.cn/usercenter/proj-mgmt/apikeys'
|
|
}
|
|
|
|
export type ZcodePlanCredentialsStatus = {
|
|
detailsUnavailable?: boolean
|
|
apiKeyConfigured: boolean
|
|
zcodeCliConfigured: boolean
|
|
apiKeyProtection: SecretAtRestProtection | null
|
|
/** Set when the saved file cannot be used here; 'sealed-elsewhere' means the other Orca app
|
|
* on that machine (desktop vs orcad) saved it. */
|
|
apiKeyUnreadable?: 'sealed-elsewhere' | 'unreadable'
|
|
}
|