@kyo-so/cli 0.9.0 → 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.
- package/CHANGELOG.md +71 -0
- package/README.ja.md +225 -123
- package/README.md +225 -126
- package/README.zh-CN.md +225 -123
- package/dist/acp/AcpAgentProcess.d.ts +2 -1
- package/dist/acp/FakeAgentManager.d.ts +1 -1
- package/dist/bin/kyoso.js +35895 -34770
- package/dist/cli/openRouterAcpSmoke.d.ts +25 -0
- package/dist/cli/pluginRuntimeContract.d.ts +4 -4
- package/dist/cli/setup.d.ts +3 -2
- package/dist/config/loadConfig.d.ts +19 -0
- package/dist/config/projectScope.d.ts +1 -1
- package/dist/config/schema.d.ts +9 -0
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/types.d.ts +1 -0
- package/dist/index.js +580 -111
- package/dist/utils/env.d.ts +13 -0
- package/examples/codex-config.toml +4 -1
- package/examples/kyoso.toml +14 -0
- package/package.json +4 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type KyosoConfig } from "../config/schema.js";
|
|
2
|
+
import type { AgentRunInput, AgentRunResult } from "../core/types.js";
|
|
3
|
+
export declare const OPENROUTER_ACP_SMOKE_OPT_IN_ENV = "KYOSO_OPENROUTER_ACP_SMOKE";
|
|
4
|
+
export declare const OPENROUTER_ACP_SMOKE_OPT_IN_VALUE = "release";
|
|
5
|
+
export declare const OPENROUTER_ACP_SMOKE_MODEL_ENV = "KYOSO_OPENROUTER_MODEL";
|
|
6
|
+
export declare const OPENROUTER_ACP_SMOKE_SUCCESS_MARKER = "KYOSO_OPENROUTER_ACP_SMOKE_OK";
|
|
7
|
+
export declare class OpenRouterCodexAcpSmokePreflightError extends Error {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class OpenRouterCodexAcpSmokeRuntimeError extends Error {
|
|
11
|
+
constructor(message: string);
|
|
12
|
+
}
|
|
13
|
+
export type OpenRouterCodexAcpSmokeOptions = {
|
|
14
|
+
env?: NodeJS.ProcessEnv;
|
|
15
|
+
runAgent?: (input: AgentRunInput, config: KyosoConfig, childEnv: NodeJS.ProcessEnv) => Promise<AgentRunResult>;
|
|
16
|
+
};
|
|
17
|
+
export declare function assertOpenRouterCodexAcpSmokeArguments(input: {
|
|
18
|
+
positionals: string[];
|
|
19
|
+
flags: Record<string, string | boolean | string[]>;
|
|
20
|
+
}): void;
|
|
21
|
+
export declare function validateOpenRouterCodexAcpSmoke(env: NodeJS.ProcessEnv): {
|
|
22
|
+
model: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function createOpenRouterCodexAcpSmokeConfig(model: string): KyosoConfig;
|
|
25
|
+
export declare function runOpenRouterCodexAcpSmoke(options?: OpenRouterCodexAcpSmokeOptions): Promise<string>;
|
|
@@ -10,9 +10,9 @@ export declare const PLUGIN_RUNTIME_COMPATIBILITY_SCHEMA_VERSION = 1;
|
|
|
10
10
|
export declare const MINIMUM_SUPPORTED_CODEX_VERSION = "0.144.0-alpha.4";
|
|
11
11
|
export declare const PLUGIN_RUNTIME_EXPECTED_CONTRACT: {
|
|
12
12
|
readonly distribution: {
|
|
13
|
-
readonly pluginVersion: "0.1
|
|
13
|
+
readonly pluginVersion: "0.3.1";
|
|
14
14
|
readonly mcpCommand: "npx";
|
|
15
|
-
readonly mcpPackagePin: "@kyo-so/cli@0.
|
|
15
|
+
readonly mcpPackagePin: "@kyo-so/cli@0.9.1";
|
|
16
16
|
};
|
|
17
17
|
readonly marketplace: {
|
|
18
18
|
readonly name: "kyoso";
|
|
@@ -129,9 +129,9 @@ export declare const pluginRuntimeContract: {
|
|
|
129
129
|
readonly pluginListTopLevelKeys: readonly ["installed", "available"];
|
|
130
130
|
readonly expectedContract: {
|
|
131
131
|
readonly distribution: {
|
|
132
|
-
readonly pluginVersion: "0.1
|
|
132
|
+
readonly pluginVersion: "0.3.1";
|
|
133
133
|
readonly mcpCommand: "npx";
|
|
134
|
-
readonly mcpPackagePin: "@kyo-so/cli@0.
|
|
134
|
+
readonly mcpPackagePin: "@kyo-so/cli@0.9.1";
|
|
135
135
|
};
|
|
136
136
|
readonly marketplace: {
|
|
137
137
|
readonly name: "kyoso";
|
package/dist/cli/setup.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type SetupOptions = {
|
|
|
18
18
|
client?: string;
|
|
19
19
|
write: boolean;
|
|
20
20
|
global: boolean;
|
|
21
|
+
withOpenRouter?: boolean;
|
|
21
22
|
runner?: string;
|
|
22
23
|
command?: string;
|
|
23
24
|
skillOnly?: boolean;
|
|
@@ -30,8 +31,8 @@ type McpCommand = {
|
|
|
30
31
|
};
|
|
31
32
|
export declare function runSetup(options: SetupOptions): Promise<string>;
|
|
32
33
|
export declare function commandForRunner(runner: SetupRunner): McpCommand;
|
|
33
|
-
export declare function buildCodexMcpToml(command: McpCommand): string;
|
|
34
|
-
export declare function buildClaudeMcpEntry(command: McpCommand): Record<string, unknown>;
|
|
34
|
+
export declare function buildCodexMcpToml(command: McpCommand, withOpenRouter?: boolean): string;
|
|
35
|
+
export declare function buildClaudeMcpEntry(command: McpCommand, withOpenRouter?: boolean): Record<string, unknown>;
|
|
35
36
|
export declare function skillDestination(client: SetupClient, scope: SetupScope, cwd: string, home: string): string;
|
|
36
37
|
export declare function resolveUserHome(env?: NodeJS.ProcessEnv): string;
|
|
37
38
|
export declare function resolveCodexConfigPath(env?: NodeJS.ProcessEnv, cwd?: string): string;
|
|
@@ -26,5 +26,24 @@ export type LoadedConfig = {
|
|
|
26
26
|
sources: LoadedConfigSource[];
|
|
27
27
|
warnings: string[];
|
|
28
28
|
};
|
|
29
|
+
export type ConfigValidationContext = {
|
|
30
|
+
source?: LoadedConfigSource;
|
|
31
|
+
projectTsExecuted: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare function getConfigValidationContext(error: unknown): ConfigValidationContext | undefined;
|
|
34
|
+
export declare class ProjectOpenRouterAuthorizationError extends Error {
|
|
35
|
+
readonly code = "PROJECT_OPENROUTER_AUTHORIZATION_REQUIRED";
|
|
36
|
+
readonly projectPath: string;
|
|
37
|
+
readonly projectDirectory: string;
|
|
38
|
+
readonly layer: "project_toml" | "project_ts";
|
|
39
|
+
readonly globalConfigPath: string;
|
|
40
|
+
constructor(input: {
|
|
41
|
+
projectPath: string;
|
|
42
|
+
projectDirectory: string;
|
|
43
|
+
layer: "project_toml" | "project_ts";
|
|
44
|
+
globalConfigPath: string;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
29
47
|
export declare function loadConfig(options?: LoadConfigOptions): Promise<LoadedConfig>;
|
|
30
48
|
export declare function resolveGlobalTomlConfigPath(env?: NodeJS.ProcessEnv): string;
|
|
49
|
+
export declare function applyProjectCodexProviderReset(baseConfig: unknown, projectConfig: unknown, mergedConfig: unknown): unknown;
|
|
@@ -6,7 +6,7 @@ type Violation = {
|
|
|
6
6
|
path: string;
|
|
7
7
|
reason?: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const kyosoConfigOverridePaths: readonly ["agents.codex.enabled", "agents.codex.model", "agents.codex.effort", "agents.codex.role", "agents.codex.timeoutMs", "agents.claude.enabled", "agents.claude.model", "agents.claude.effort", "agents.claude.role", "agents.claude.timeoutMs", "verification.enabled", "verification.maxFindings", "verification.timeoutMs", "judge.mode", "judge.provider", "judge.timeoutMs"];
|
|
9
|
+
export declare const kyosoConfigOverridePaths: readonly ["agents.codex.enabled", "agents.codex.model", "agents.codex.provider", "agents.codex.effort", "agents.codex.role", "agents.codex.timeoutMs", "agents.claude.enabled", "agents.claude.model", "agents.claude.effort", "agents.claude.role", "agents.claude.timeoutMs", "verification.enabled", "verification.maxFindings", "verification.timeoutMs", "judge.mode", "judge.provider", "judge.timeoutMs"];
|
|
10
10
|
export declare function isAllowedConfigOverridePath(path: string[]): boolean;
|
|
11
11
|
export declare function mergeProjectTomlConfig(baseConfig: unknown, projectConfig: unknown, options: ProjectScopeOptions): unknown;
|
|
12
12
|
export declare function collectProjectScopeViolations(config: unknown): Violation[];
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const CODEX_OPENROUTER_PROVIDER: "openrouter";
|
|
3
|
+
export declare const CODEX_DEFAULT_PROVIDER: "default";
|
|
4
|
+
export declare const CODEX_OPENROUTER_MODEL_REQUIRED_ISSUE: "codex_openrouter_model_required";
|
|
5
|
+
export type CodexProvider = typeof CODEX_OPENROUTER_PROVIDER | typeof CODEX_DEFAULT_PROVIDER;
|
|
2
6
|
type PartialDeep<T> = {
|
|
3
7
|
[K in keyof T]?: T[K] extends Record<string, unknown> ? PartialDeep<T[K]> : T[K];
|
|
4
8
|
};
|
|
@@ -35,6 +39,11 @@ export declare const kyosoConfigSchema: z.ZodObject<{
|
|
|
35
39
|
recommendedEnv: z.ZodArray<z.ZodString>;
|
|
36
40
|
envWhitelist: z.ZodArray<z.ZodString>;
|
|
37
41
|
}, z.core.$strip>;
|
|
42
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
openrouter: "openrouter";
|
|
44
|
+
default: "default";
|
|
45
|
+
}>>;
|
|
46
|
+
allowProjectProvider: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
38
47
|
}, z.core.$strip>;
|
|
39
48
|
claude: z.ZodObject<{
|
|
40
49
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export declare const DEFAULT_MAX_DIFF_BYTES = 300000;
|
|
|
4
4
|
export declare const RAW_OUTPUT_MAX_CHARS = 16384;
|
|
5
5
|
export declare const TRACE_DIR = ".kyoso/traces";
|
|
6
6
|
export declare const KYOSO_CHILD_AGENT = "KYOSO_CHILD_AGENT";
|
|
7
|
-
export declare const KYOSO_VERSION = "0.
|
|
7
|
+
export declare const KYOSO_VERSION = "0.10.0";
|
package/dist/core/types.d.ts
CHANGED