feat(models): add Z.AI (GLM) credential integration and setup flow
Implement first-class Z.AI credential storage and authentication: - New auth provider: src/auth/zai.ts for Z.AI API key management - New CLI command: flynn zai-auth to store Z.AI API keys - New TUI command: /login zai for interactive credential entry - Modified src/auth/index.ts to register zai provider - Modified src/cli/index.ts to register zai-auth command - Modified src/cli/setup/providers.ts to include Z.AI in setup wizard - Modified src/daemon/models.ts to support zhipuai use_oauth flag - Modified src/daemon/clientFactory.test.ts to add Z.AI tests - Modified src/frontends/tui/commands.ts to add login command - Modified src/frontends/tui/minimal.ts to support credential prompts This allows users to authenticate with Z.AI (GLM models) without embedding secrets in config files. Credentials are stored securely in ~/.config/flynn/auth.json and resolved at runtime. Updated state.json with new feature entry documenting the integration.
This commit is contained in:
@@ -19,6 +19,7 @@ import { registerGdocsAuthCommand } from './gdocs-auth.js';
|
||||
import { registerGdriveAuthCommand } from './gdrive-auth.js';
|
||||
import { registerGtasksAuthCommand } from './gtasks-auth.js';
|
||||
import { registerOpenaiAuthCommand } from './openai-auth.js';
|
||||
import { registerZaiAuthCommand } from './zai-auth.js';
|
||||
import { registerSkillsCommand } from './skills.js';
|
||||
|
||||
export function createProgram(): Command {
|
||||
@@ -43,6 +44,7 @@ export function createProgram(): Command {
|
||||
registerGdriveAuthCommand(program);
|
||||
registerGtasksAuthCommand(program);
|
||||
registerOpenaiAuthCommand(program);
|
||||
registerZaiAuthCommand(program);
|
||||
registerSkillsCommand(program);
|
||||
|
||||
return program;
|
||||
|
||||
Reference in New Issue
Block a user