Files
orca/src/shared/zcode-plan-sites.ts
T
Neil 8967b10d41 chore: remove verified dead code and calibrate Knip entries (#31903)
* chore: remove verified dead code and calibrate Knip entries

* fix: include mjs consumers in dead-code analysis
2026-10-22 02:19:04 -07:00

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'
}