@kyo-so/cli 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,18 @@
1
+ import { type CodexProvider } from "../config/schema.js";
2
+ export declare const OPENROUTER_API_KEY_ENV = "OPENROUTER_API_KEY";
3
+ export declare const KYOSO_OPENROUTER_PROVIDER_ID = "kyoso-openrouter";
4
+ export declare class ChildEnvPreflightError extends Error {
5
+ readonly code: "OPENROUTER_KEY_MISSING" | "AGENT_CONFIG_INVALID";
6
+ constructor(code: "OPENROUTER_KEY_MISSING" | "AGENT_CONFIG_INVALID", message: string);
7
+ }
1
8
  export declare function buildChildEnv(parentEnv: NodeJS.ProcessEnv, whitelist: string[], explicit: Record<string, string>, options?: {
2
9
  agent?: "codex" | "claude";
3
10
  model?: string;
11
+ provider?: CodexProvider;
4
12
  preferApiKey?: boolean;
13
+ onCredentialPlaceholderDiscarded?: (key: string) => void;
14
+ onOpenRouterCredentialWithheld?: (key: string) => void;
15
+ onOpenRouterProvidersDiscarded?: (count: number) => void;
5
16
  }): NodeJS.ProcessEnv;
17
+ export declare function hasUsableEnvValue(env: Record<string, string | undefined>, key: string): boolean;
18
+ export declare function isUnexpandedEnvPlaceholder(value: string | undefined): boolean;
@@ -1,7 +1,10 @@
1
1
  [mcp_servers.kyoso]
2
2
  command = "npx"
3
3
  args = ["-y", "@kyo-so/cli", "mcp"]
4
- env_vars = ["OPENAI_API_KEY", "CODEX_API_KEY", "ANTHROPIC_API_KEY", "CLAUDE_CODE_OAUTH_TOKEN"]
4
+ # Generated by `kyoso setup codex --write`. For OpenRouter, use
5
+ # `kyoso setup codex --write --with-openrouter`, or insert
6
+ # "OPENROUTER_API_KEY" after "CODEX_ACCESS_TOKEN" in this list.
7
+ env_vars = ["OPENAI_API_KEY", "CODEX_API_KEY", "CODEX_HOME", "CODEX_ACCESS_TOKEN", "ANTHROPIC_API_KEY", "CLAUDE_CODE_OAUTH_TOKEN"]
5
8
  startup_timeout_sec = 20
6
9
  tool_timeout_sec = 360
7
10
  enabled = true
@@ -4,6 +4,20 @@ defaultMode = "model_only"
4
4
  [agents.codex]
5
5
  # Omit model to use the user's Codex default from ~/.codex/config.toml.
6
6
  # model = "gpt-5.5"
7
+ #
8
+ # To opt in here, or override a model while OpenRouter is inherited, first add
9
+ # this exact absolute project directory to
10
+ # `allowProjectProvider = ["/absolute/path/to/project"]` under `[agents.codex]`
11
+ # in user-global `~/.config/kyoso/config.toml`. Project TOML and `--set` cannot
12
+ # grant that authorization; legacy boolean values are rejected. A non-empty model
13
+ # is required.
14
+ # provider = "openrouter"
15
+ # model = "openai/o4-mini"
16
+ #
17
+ # To reset an inherited user-global OpenRouter selection for this project:
18
+ # provider = "default"
19
+ #
20
+ # Remove provider to return to the existing Codex provider/login behavior.
7
21
 
8
22
  [agents.claude]
9
23
  # Omit model to use the Claude adapter default.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyo-so/cli",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Kyo-so: MCP-native, ACP-powered multi-agent review gates for AI coding workflows.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {
@@ -43,6 +43,7 @@
43
43
  "lint": "tsc --noEmit",
44
44
  "format": "prettier --write .",
45
45
  "format:check": "prettier --check .",
46
+ "smoke:openrouter:codex-acp": "bun run src/cli/main.ts openrouter-acp-smoke",
46
47
  "plugin:sync": "node scripts/plugin-sync.mjs",
47
48
  "plugin:verify": "node scripts/verify-plugin.mjs",
48
49
  "plugin:verify:registry": "node scripts/verify-plugin-registry.mjs",