Files
orca/src/shared/zcode-plan-sites.ts
T
NeilandLuchong b032867021 feat(accounts): link standalone GLM Coding Plans (#24618)
* feat(accounts): link standalone GLM Coding Plans

Adapt the reviewed GLM accounts contribution to current main, retain Antigravity behavior, guard late credential results, expose storage protection, and redact quota errors.

Co-authored-by: Luchong <lu740528977@gmail.com>

* fix(accounts): retain GLM credential results during quota refresh

* fix(accounts): make GLM credential editing desktop-only

* fix(accounts): mirror the host GLM site in paired clients

* fix(accounts): report unknown GLM host details and split web settings tests

Apply the independently reviewed Accounts correction from697284a without the v2 adapter commits. Preserve the saved-key store and serialized write behavior.

* fix(zcode): ship required GLM account translation entries

* chore: record GLM reconciliation hook validation

* chore: validate installed GLM commit hooks

* test: complete GLM account fixtures and web API inventory

---------

Co-authored-by: Luchong <lu740528977@gmail.com>
2026-10-02 20:57:47 -07:00

33 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_SITES: readonly ZcodePlanSite[] = ['zai', 'bigmodel']
export function isZcodePlanSite(value: unknown): value is ZcodePlanSite {
return value === 'zai' || value === '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
}