mirror of
https://github.com/getpaseo/paseo.git
synced 2026-12-01 04:36:26 +00:00
* fix(usage): support OpenCode v2 usageSession, session scopes, and Codex opencode.db logins - Implement usageSession() on OpenCodeV2Session with provider "opencode", authoritative model tracking (info.model falling back to config.model), effective provider + launch harness environment, and a stable sessionKey. - Read active and migrated OpenAI OAuth logins from OpenCode v2's opencode.db in codex-usage-source (honoring absolute/relative OPENCODE_DB, active=1 or migrated active IS NULL, falling back to v1 auth.json, and normalizing provider to "opencode"). - Add OpenCode session-scope discovery to built-in usage sources OpenCode serves (opencode-go, minimax, zai, kimi, grok, copilot, openrouter-host). Co-authored-by: Jiayang Wu <651475459@qq.com> * fix(usage): keep Copilot/Kimi default visibility hints and deduplicate session discovery helpers --------- Co-authored-by: Jiayang Wu <651475459@qq.com>
11 lines
372 B
TypeScript
11 lines
372 B
TypeScript
import { z } from "zod";
|
|
/** `credentials` is OpenCode 2's own login listing with auth.json behind it; `file` is auth.json only. */
|
|
export const inputSchema = z
|
|
.object({
|
|
store: z.enum(["file", "credentials"]),
|
|
dataHome: z.string().min(1).optional(),
|
|
database: z.string().min(1).optional(),
|
|
})
|
|
.strict();
|
|
export type Input = z.infer<typeof inputSchema>;
|