@kyo-so/cli 0.13.1 → 0.15.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/.agents/skills/kyoso-review/SKILL.md +3 -2
- package/CHANGELOG.md +57 -0
- package/README.ja.md +23 -15
- package/README.md +66 -21
- package/README.zh-CN.md +23 -15
- package/dist/acp/AcpAgentProcess.d.ts +4 -1
- package/dist/acp/AgentOutputAccumulator.d.ts +29 -0
- package/dist/acp/codexRetryUpdate.d.ts +6 -0
- package/dist/bin/kyoso.js +3330 -882
- package/dist/cli/integration.d.ts +6 -3
- package/dist/cli/knownSkillDigests.d.ts +5 -1
- package/dist/cli/manualMcpInvocation.d.ts +11 -0
- package/dist/cli/packageRunner.d.ts +15 -0
- package/dist/cli/pluginRuntimeContract.d.ts +8 -6
- package/dist/cli/progress.d.ts +5 -0
- package/dist/cli/setup.d.ts +33 -1
- package/dist/config/projectScope.d.ts +1 -1
- package/dist/config/schema.d.ts +6 -0
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/errors.d.ts +5 -0
- package/dist/core/progress.d.ts +83 -0
- package/dist/core/progressDispatcher.d.ts +12 -0
- package/dist/core/reviewBudget.d.ts +8 -0
- package/dist/core/runReview.d.ts +4 -0
- package/dist/core/types.d.ts +35 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1518 -659
- package/dist/judge/provider.d.ts +1 -0
- package/dist/judge/signals.d.ts +4 -0
- package/dist/mcp/progress.d.ts +18 -0
- package/dist/utils/env.d.ts +5 -1
- package/examples/claude-code-mcp.json +1 -1
- package/examples/codex-config.toml +2 -2
- package/examples/kyoso.toml +7 -0
- package/package.json +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManualMcpStatus } from "./setup.js";
|
|
1
|
+
import type { ManualMcpRegistration, ManualMcpStatus } from "./setup.js";
|
|
2
2
|
export type IntegrationMode = "manual-mcp" | "cli-skill" | "skill-on-demand" | "mcp-only" | "cli-only" | "missing" | "unknown";
|
|
3
3
|
export type InstalledCli = {
|
|
4
4
|
kind: "installed";
|
|
@@ -8,10 +8,11 @@ export type InstalledCli = {
|
|
|
8
8
|
export type CliAvailability = InstalledCli | {
|
|
9
9
|
kind: "missing" | "transient" | "unknown";
|
|
10
10
|
};
|
|
11
|
+
export type RunnerAvailability = "available" | "missing" | "present-unverified";
|
|
11
12
|
export type CliDetection = {
|
|
12
13
|
kyoso: CliAvailability;
|
|
13
|
-
npx:
|
|
14
|
-
bunx:
|
|
14
|
+
npx: RunnerAvailability;
|
|
15
|
+
bunx: RunnerAvailability;
|
|
15
16
|
};
|
|
16
17
|
export type NonPluginIntegration = {
|
|
17
18
|
mode: IntegrationMode;
|
|
@@ -24,7 +25,9 @@ export declare function detectCli(options: {
|
|
|
24
25
|
}): CliDetection;
|
|
25
26
|
export declare function determineNonPluginIntegration(options: {
|
|
26
27
|
manualMcpStatus: ManualMcpStatus;
|
|
28
|
+
manualMcpRegistrations: readonly ManualMcpRegistration[];
|
|
27
29
|
hasSkill: boolean;
|
|
28
30
|
cli: CliDetection;
|
|
29
31
|
}): NonPluginIntegration;
|
|
32
|
+
export declare function formatRunnerAvailability(runner: RunnerAvailability): string;
|
|
30
33
|
export declare function formatCliAvailability(cli: CliAvailability): string;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export declare const CURRENT_SKILL_DIGEST = "sha256:
|
|
1
|
+
export declare const CURRENT_SKILL_DIGEST = "sha256:d28acaadf490df9e58e12f195804f181a683d0d33344275d7989efbee26a4504";
|
|
2
2
|
export declare const KNOWN_SKILL_DIGESTS_BY_VERSION: {
|
|
3
|
+
readonly "0.13.1": readonly [{
|
|
4
|
+
readonly digest: "sha256:8654e68ea61f2acea29027056802bf627ad737f084c9a86ab052946943538409";
|
|
5
|
+
readonly kind: "historical";
|
|
6
|
+
}];
|
|
3
7
|
readonly "0.11.0": readonly [{
|
|
4
8
|
readonly digest: "sha256:110dd872a3d1c8a71474a0eadb226f51a6addd86f9d4f3ed17b73678b3179a4e";
|
|
5
9
|
readonly kind: "historical";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type KyosoPackageCommand, type KyosoPackageRunner } from "./packageRunner.js";
|
|
2
|
+
export type ManualMcpInvocationKind = "current" | "legacy" | "custom" | "unknown";
|
|
3
|
+
export type ManualMcpInvocationInspection = {
|
|
4
|
+
kind: ManualMcpInvocationKind;
|
|
5
|
+
runner?: KyosoPackageRunner;
|
|
6
|
+
packageSpec?: string;
|
|
7
|
+
legacyArgs?: readonly string[];
|
|
8
|
+
replacement?: KyosoPackageCommand;
|
|
9
|
+
reason: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function inspectManualMcpInvocation(value: unknown): ManualMcpInvocationInspection;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const KYOSO_PACKAGE_NAME = "@kyo-so/cli";
|
|
2
|
+
export declare const KYOSO_EXECUTABLE_NAME = "kyoso";
|
|
3
|
+
export type KyosoPackageRunner = "npx" | "bunx";
|
|
4
|
+
export type KyosoPackageCommand = {
|
|
5
|
+
command: KyosoPackageRunner;
|
|
6
|
+
args: string[];
|
|
7
|
+
};
|
|
8
|
+
export type BuildKyosoPackageCommandOptions = {
|
|
9
|
+
runner: KyosoPackageRunner;
|
|
10
|
+
cliArgs: readonly string[];
|
|
11
|
+
version?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function buildKyosoPackageCommand(options: BuildKyosoPackageCommandOptions): KyosoPackageCommand;
|
|
14
|
+
export declare function formatKyosoPackageCommand(options: BuildKyosoPackageCommandOptions): string;
|
|
15
|
+
export declare function isCompleteSemVer(value: string): boolean;
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
* retains dated probe metadata, which deliberately does not belong in the
|
|
7
7
|
* published CLI.
|
|
8
8
|
*/
|
|
9
|
-
export declare const PLUGIN_RUNTIME_COMPATIBILITY_SCHEMA_VERSION =
|
|
9
|
+
export declare const PLUGIN_RUNTIME_COMPATIBILITY_SCHEMA_VERSION = 2;
|
|
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.7.
|
|
13
|
+
readonly pluginVersion: "0.7.3";
|
|
14
14
|
readonly mcpCommand: "npx";
|
|
15
|
-
readonly mcpPackagePin: "@kyo-so/cli@0.
|
|
15
|
+
readonly mcpPackagePin: "@kyo-so/cli@0.14.0";
|
|
16
|
+
readonly mcpExecutable: "kyoso";
|
|
16
17
|
};
|
|
17
18
|
readonly marketplace: {
|
|
18
19
|
readonly name: "kyoso";
|
|
@@ -124,15 +125,16 @@ export declare const PLUGIN_LIST_JSON_SCHEMA: {
|
|
|
124
125
|
};
|
|
125
126
|
/** Stable runtime contract consumed by Doctor and distribution verification. */
|
|
126
127
|
export declare const pluginRuntimeContract: {
|
|
127
|
-
readonly schemaVersion:
|
|
128
|
+
readonly schemaVersion: 2;
|
|
128
129
|
readonly minimumSupportedCodexVersion: "0.144.0-alpha.4";
|
|
129
130
|
readonly pluginId: "kyoso@kyoso";
|
|
130
131
|
readonly pluginListTopLevelKeys: readonly ["installed", "available"];
|
|
131
132
|
readonly expectedContract: {
|
|
132
133
|
readonly distribution: {
|
|
133
|
-
readonly pluginVersion: "0.7.
|
|
134
|
+
readonly pluginVersion: "0.7.3";
|
|
134
135
|
readonly mcpCommand: "npx";
|
|
135
|
-
readonly mcpPackagePin: "@kyo-so/cli@0.
|
|
136
|
+
readonly mcpPackagePin: "@kyo-so/cli@0.14.0";
|
|
137
|
+
readonly mcpExecutable: "kyoso";
|
|
136
138
|
};
|
|
137
139
|
readonly marketplace: {
|
|
138
140
|
readonly name: "kyoso";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReviewProgressEvent, ReviewProgressSink } from "../core/progress.js";
|
|
2
|
+
export type CliProgressMode = "auto" | "plain" | "jsonl" | "off";
|
|
3
|
+
export declare function resolveCliProgressMode(value: string | undefined, stderrIsTty: boolean): CliProgressMode;
|
|
4
|
+
export declare function createCliProgressSink(mode: CliProgressMode, stderrWrite: (line: string) => void): ReviewProgressSink | undefined;
|
|
5
|
+
export declare function formatPlainProgressMessage(event: ReviewProgressEvent): string;
|
package/dist/cli/setup.d.ts
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
|
+
import { type ManualMcpInvocationInspection } from "./manualMcpInvocation.js";
|
|
2
|
+
import { type KyosoPackageRunner } from "./packageRunner.js";
|
|
1
3
|
export type SetupClient = "codex" | "claude-code";
|
|
2
|
-
export type SetupRunner =
|
|
4
|
+
export type SetupRunner = KyosoPackageRunner;
|
|
3
5
|
export type SetupScope = "project" | "global";
|
|
4
6
|
export type ManualMcpStatus = "enabled" | "disabled" | "missing" | "unknown";
|
|
7
|
+
export type ManualMcpScope = "codex-global" | "claude-project" | "claude-global" | "claude-global-project";
|
|
8
|
+
export type ManualMcpRegistration = {
|
|
9
|
+
path: string;
|
|
10
|
+
scope: ManualMcpScope;
|
|
11
|
+
status: ManualMcpStatus;
|
|
12
|
+
invocation: ManualMcpInvocationInspection;
|
|
13
|
+
autoMigrationEligible: boolean;
|
|
14
|
+
};
|
|
5
15
|
export type SetupDetection = {
|
|
6
16
|
mcp: boolean;
|
|
7
17
|
skill: boolean;
|
|
8
18
|
manualMcpStatus: ManualMcpStatus;
|
|
19
|
+
manualMcpRegistrations: ManualMcpRegistration[];
|
|
9
20
|
mcpPaths: string[];
|
|
10
21
|
skillPaths: string[];
|
|
11
22
|
};
|
|
23
|
+
export type BunxVersionProbeResult = {
|
|
24
|
+
status: "verified";
|
|
25
|
+
version: string;
|
|
26
|
+
} | {
|
|
27
|
+
status: "missing" | "failed" | "timeout" | "invalid" | "unsupported";
|
|
28
|
+
detail: string;
|
|
29
|
+
};
|
|
30
|
+
export type BunxVersionProbe = (options: {
|
|
31
|
+
cwd: string;
|
|
32
|
+
env: NodeJS.ProcessEnv;
|
|
33
|
+
}) => BunxVersionProbeResult;
|
|
12
34
|
export type CodexPluginMcpOverride = {
|
|
13
35
|
status: ManualMcpStatus;
|
|
14
36
|
path: string;
|
|
@@ -24,6 +46,12 @@ export type SetupOptions = {
|
|
|
24
46
|
skillOnly?: boolean;
|
|
25
47
|
force?: boolean;
|
|
26
48
|
env?: NodeJS.ProcessEnv;
|
|
49
|
+
bunxVersionProbe?: BunxVersionProbe;
|
|
50
|
+
beforeManualMcpWrite?: (path: string) => void | Promise<void>;
|
|
51
|
+
beforeManualMcpCommit?: (path: string) => void | Promise<void>;
|
|
52
|
+
afterManualMcpValidation?: (path: string) => void | Promise<void>;
|
|
53
|
+
beforeManualMcpRename?: (path: string) => void | Promise<void>;
|
|
54
|
+
manualMcpRename?: (source: string, destination: string) => Promise<void>;
|
|
27
55
|
};
|
|
28
56
|
type McpCommand = {
|
|
29
57
|
command: string;
|
|
@@ -47,4 +75,8 @@ export declare function detectSetup(options: {
|
|
|
47
75
|
codexHome?: string;
|
|
48
76
|
env?: NodeJS.ProcessEnv;
|
|
49
77
|
}): Record<SetupClient, SetupDetection>;
|
|
78
|
+
export declare function probeBunxVersion(options: {
|
|
79
|
+
cwd: string;
|
|
80
|
+
env: NodeJS.ProcessEnv;
|
|
81
|
+
}): BunxVersionProbeResult;
|
|
50
82
|
export {};
|
|
@@ -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.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"];
|
|
9
|
+
export declare const kyosoConfigOverridePaths: readonly ["agents.codex.enabled", "agents.codex.model", "agents.codex.provider", "agents.codex.openRouter.streamIdleTimeoutMs", "agents.codex.openRouter.streamMaxRetries", "agents.codex.openRouter.requestMaxRetries", "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
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const CODEX_OPENROUTER_PROVIDER: "openrouter";
|
|
3
3
|
export declare const CODEX_DEFAULT_PROVIDER: "default";
|
|
4
4
|
export declare const CODEX_OPENROUTER_MODEL_REQUIRED_ISSUE: "codex_openrouter_model_required";
|
|
5
|
+
export declare const CODEX_OPENROUTER_POLICY_REQUIRES_PROVIDER_ISSUE: "codex_openrouter_policy_requires_provider";
|
|
5
6
|
export type CodexProvider = typeof CODEX_OPENROUTER_PROVIDER | typeof CODEX_DEFAULT_PROVIDER;
|
|
6
7
|
type PartialDeep<T> = {
|
|
7
8
|
[K in keyof T]?: T[K] extends Record<string, unknown> ? PartialDeep<T[K]> : T[K];
|
|
@@ -63,6 +64,11 @@ export declare const kyosoConfigSchema: z.ZodObject<{
|
|
|
63
64
|
default: "default";
|
|
64
65
|
}>>;
|
|
65
66
|
allowProjectProvider: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
67
|
+
openRouter: z.ZodDefault<z.ZodObject<{
|
|
68
|
+
streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
streamMaxRetries: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
requestMaxRetries: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
66
72
|
}, z.core.$strip>;
|
|
67
73
|
claude: z.ZodObject<{
|
|
68
74
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare const JUDGE_MAX_OUTPUT_TOKENS = 4096;
|
|
|
7
7
|
export declare const RAW_OUTPUT_MAX_CHARS = 16384;
|
|
8
8
|
export declare const TRACE_DIR = ".kyoso/traces";
|
|
9
9
|
export declare const KYOSO_CHILD_AGENT = "KYOSO_CHILD_AGENT";
|
|
10
|
-
export declare const KYOSO_VERSION = "0.
|
|
10
|
+
export declare const KYOSO_VERSION = "0.15.0";
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -2,3 +2,8 @@ export declare class KyosoRequestError extends Error {
|
|
|
2
2
|
readonly code: string;
|
|
3
3
|
constructor(message: string, code: string);
|
|
4
4
|
}
|
|
5
|
+
export declare class KyosoCancellationError extends Error {
|
|
6
|
+
readonly code = "REQUEST_CANCELLED";
|
|
7
|
+
constructor(message?: string);
|
|
8
|
+
}
|
|
9
|
+
export declare function throwIfAborted(signal?: AbortSignal): void;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { AgentName, AgentRole, KyosoDecision, ModelExecutionIdentity, ReviewCompletion, ReviewTool } from "./types.js";
|
|
2
|
+
export type ReviewPhase = "preflight" | "context" | "snapshot" | "primary" | "aggregation" | "verification" | "judge" | "finalize";
|
|
3
|
+
export type ReviewProgressEvent = {
|
|
4
|
+
type: "review_started";
|
|
5
|
+
traceId: string;
|
|
6
|
+
tool: ReviewTool;
|
|
7
|
+
timestamp: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: "phase_started";
|
|
10
|
+
traceId: string;
|
|
11
|
+
phase: ReviewPhase;
|
|
12
|
+
timestamp: string;
|
|
13
|
+
} | {
|
|
14
|
+
type: "phase_completed";
|
|
15
|
+
traceId: string;
|
|
16
|
+
phase: ReviewPhase;
|
|
17
|
+
durationMs: number;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: "phase_skipped";
|
|
21
|
+
traceId: string;
|
|
22
|
+
phase: ReviewPhase;
|
|
23
|
+
reason: string;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "agent_started";
|
|
27
|
+
traceId: string;
|
|
28
|
+
agent: AgentName;
|
|
29
|
+
role: AgentRole;
|
|
30
|
+
executionIdentity?: ModelExecutionIdentity;
|
|
31
|
+
timestamp: string;
|
|
32
|
+
} | {
|
|
33
|
+
type: "agent_activity";
|
|
34
|
+
traceId: string;
|
|
35
|
+
agent: AgentName;
|
|
36
|
+
activity: "message" | "thought" | "protocol";
|
|
37
|
+
totalOutputBytes: number;
|
|
38
|
+
timestamp: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: "agent_waiting";
|
|
41
|
+
traceId: string;
|
|
42
|
+
agent: AgentName;
|
|
43
|
+
elapsedMs: number;
|
|
44
|
+
sinceLastAcpUpdateMs: number;
|
|
45
|
+
streamIdleTimeoutMs?: number;
|
|
46
|
+
timestamp: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "agent_retrying";
|
|
49
|
+
traceId: string;
|
|
50
|
+
agent: AgentName;
|
|
51
|
+
observedRetry: number;
|
|
52
|
+
attempt?: number;
|
|
53
|
+
maxRetries?: number;
|
|
54
|
+
reason: string;
|
|
55
|
+
discardedMessageBytes: number;
|
|
56
|
+
timestamp: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "agent_completed";
|
|
59
|
+
traceId: string;
|
|
60
|
+
agent: AgentName;
|
|
61
|
+
status: "completed" | "failed" | "timeout" | "skipped";
|
|
62
|
+
durationMs: number;
|
|
63
|
+
outputBytes?: number;
|
|
64
|
+
observedStreamRetries?: number;
|
|
65
|
+
timestamp: string;
|
|
66
|
+
} | {
|
|
67
|
+
type: "review_completed";
|
|
68
|
+
traceId: string;
|
|
69
|
+
decision: KyosoDecision;
|
|
70
|
+
completionStatus: ReviewCompletion["status"];
|
|
71
|
+
durationMs: number;
|
|
72
|
+
timestamp: string;
|
|
73
|
+
} | {
|
|
74
|
+
type: "review_failed";
|
|
75
|
+
traceId: string;
|
|
76
|
+
errorCode?: string;
|
|
77
|
+
timestamp: string;
|
|
78
|
+
} | {
|
|
79
|
+
type: "review_cancelled";
|
|
80
|
+
traceId: string;
|
|
81
|
+
timestamp: string;
|
|
82
|
+
};
|
|
83
|
+
export type ReviewProgressSink = (event: ReviewProgressEvent) => void | Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReviewProgressEvent, ReviewProgressSink } from "./progress.js";
|
|
2
|
+
type ProgressDispatcherOptions = {
|
|
3
|
+
sinkTimeoutMs?: number;
|
|
4
|
+
maxQueue?: number;
|
|
5
|
+
onSinkDisabled?: (reason: string) => void;
|
|
6
|
+
};
|
|
7
|
+
export type ProgressDispatcher = {
|
|
8
|
+
emit(event: ReviewProgressEvent): void;
|
|
9
|
+
flush(maxWaitMs?: number): Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export declare function createProgressDispatcher(sink: ReviewProgressSink | undefined, options?: ProgressDispatcherOptions): ProgressDispatcher;
|
|
12
|
+
export {};
|
|
@@ -10,6 +10,10 @@ type Reservation = {
|
|
|
10
10
|
thoughtBytes?: number;
|
|
11
11
|
outputBytes?: number;
|
|
12
12
|
outputWarningTriggered?: boolean;
|
|
13
|
+
observedStreamRetries?: number;
|
|
14
|
+
discardedRetryMessageBytes?: number;
|
|
15
|
+
firstOutputAt?: string;
|
|
16
|
+
lastAcpUpdateAt?: string;
|
|
13
17
|
salvaged?: boolean;
|
|
14
18
|
reportedFindings?: number;
|
|
15
19
|
findingsTargetExceeded?: boolean;
|
|
@@ -65,6 +69,10 @@ export declare class ReviewBudgetTracker {
|
|
|
65
69
|
thoughtBytes?: number;
|
|
66
70
|
outputBytes?: number;
|
|
67
71
|
outputWarningTriggered?: boolean;
|
|
72
|
+
observedStreamRetries?: number;
|
|
73
|
+
discardedRetryMessageBytes?: number;
|
|
74
|
+
firstOutputAt?: string;
|
|
75
|
+
lastAcpUpdateAt?: string;
|
|
68
76
|
salvaged?: boolean;
|
|
69
77
|
reportedFindings?: number;
|
|
70
78
|
findingsTargetExceeded?: boolean;
|
package/dist/core/runReview.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type KyosoConfig } from "../config/schema.js";
|
|
|
2
2
|
import { type LoadConfigOptions } from "../config/loadConfig.js";
|
|
3
3
|
import type { AcpAgentManager } from "../acp/AcpAgentManager.js";
|
|
4
4
|
import { type TraceWriter, type TraceWriterOptions } from "../audit/trace.js";
|
|
5
|
+
import type { ReviewProgressSink } from "./progress.js";
|
|
5
6
|
import type { KyosoResult, KyosoReviewRequest, NetworkMode, ReviewTool } from "./types.js";
|
|
6
7
|
export type RunReviewOptions = LoadConfigOptions & {
|
|
7
8
|
config?: KyosoConfig;
|
|
@@ -12,5 +13,8 @@ export type RunReviewOptions = LoadConfigOptions & {
|
|
|
12
13
|
mcpNetworkMode?: NetworkMode;
|
|
13
14
|
entrypoint?: "cli" | "mcp" | "core";
|
|
14
15
|
traceWriterFactory?: (options: TraceWriterOptions) => TraceWriter;
|
|
16
|
+
onProgress?: ReviewProgressSink;
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
progressHeartbeatMs?: number;
|
|
15
19
|
};
|
|
16
20
|
export declare function runReview(tool: ReviewTool, request: KyosoReviewRequest, options?: RunReviewOptions): Promise<KyosoResult>;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -193,6 +193,29 @@ export type CrossModelAnalysis = {
|
|
|
193
193
|
}>;
|
|
194
194
|
provider: string;
|
|
195
195
|
};
|
|
196
|
+
export type AgentProgressEvent = {
|
|
197
|
+
type: "agent_retrying";
|
|
198
|
+
agent: AgentName;
|
|
199
|
+
observedRetry: number;
|
|
200
|
+
attempt?: number;
|
|
201
|
+
maxRetries?: number;
|
|
202
|
+
reason: string;
|
|
203
|
+
discardedMessageBytes: number;
|
|
204
|
+
timestamp: string;
|
|
205
|
+
} | {
|
|
206
|
+
type: "agent_activity";
|
|
207
|
+
agent: AgentName;
|
|
208
|
+
activity: "message" | "thought" | "protocol";
|
|
209
|
+
totalOutputBytes: number;
|
|
210
|
+
timestamp: string;
|
|
211
|
+
} | {
|
|
212
|
+
type: "agent_waiting";
|
|
213
|
+
agent: AgentName;
|
|
214
|
+
elapsedMs: number;
|
|
215
|
+
sinceLastAcpUpdateMs: number;
|
|
216
|
+
streamIdleTimeoutMs?: number;
|
|
217
|
+
timestamp: string;
|
|
218
|
+
};
|
|
196
219
|
export type AgentRunInput = {
|
|
197
220
|
traceId: string;
|
|
198
221
|
agent: AgentName;
|
|
@@ -205,7 +228,11 @@ export type AgentRunInput = {
|
|
|
205
228
|
warnOutputBytes?: number;
|
|
206
229
|
maxOutputBytes?: number;
|
|
207
230
|
networkMode: NetworkMode;
|
|
231
|
+
signal?: AbortSignal;
|
|
232
|
+
heartbeatMs?: number;
|
|
233
|
+
streamIdleTimeoutMs?: number;
|
|
208
234
|
onStarted?: (executionIdentity?: ModelExecutionIdentity) => unknown;
|
|
235
|
+
onProgress?: (event: AgentProgressEvent) => unknown;
|
|
209
236
|
};
|
|
210
237
|
export type AgentRunResult = {
|
|
211
238
|
agent: AgentName;
|
|
@@ -225,6 +252,10 @@ export type AgentRunResult = {
|
|
|
225
252
|
thoughtBytes?: number;
|
|
226
253
|
outputBytes?: number;
|
|
227
254
|
outputWarningTriggered?: boolean;
|
|
255
|
+
observedStreamRetries?: number;
|
|
256
|
+
discardedRetryMessageBytes?: number;
|
|
257
|
+
firstOutputAt?: string;
|
|
258
|
+
lastAcpUpdateAt?: string;
|
|
228
259
|
salvaged?: boolean;
|
|
229
260
|
reportedFindings?: number;
|
|
230
261
|
findingsTargetExceeded?: boolean;
|
|
@@ -271,6 +302,10 @@ export type ReviewModelCallAudit = {
|
|
|
271
302
|
thoughtBytes?: number;
|
|
272
303
|
outputBytes?: number;
|
|
273
304
|
outputWarningTriggered?: boolean;
|
|
305
|
+
observedStreamRetries?: number;
|
|
306
|
+
discardedRetryMessageBytes?: number;
|
|
307
|
+
firstOutputAt?: string;
|
|
308
|
+
lastAcpUpdateAt?: string;
|
|
274
309
|
salvaged?: boolean;
|
|
275
310
|
reportedFindings?: number;
|
|
276
311
|
findingsTargetExceeded?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { defineConfig } from "./config/defineConfig.js";
|
|
2
2
|
export { runReview } from "./core/runReview.js";
|
|
3
|
+
export { KyosoCancellationError } from "./core/errors.js";
|
|
4
|
+
export type { ReviewPhase, ReviewProgressEvent, ReviewProgressSink, } from "./core/progress.js";
|
|
3
5
|
export type { ChangeRelation, CisaSecureByDesignResult, EvidenceQuality, EvidenceRef, FindingDisposition, GateStatus, KyosoDecision, KyosoFinding, KyosoResult, KyosoReviewRequest, ModelExecutionIdentity, ModelProviderRoute, ModelTokenUsage, NetworkMode, ReviewBudget, ReviewBudgetRequest, ReviewCompletion, ReviewContract, ReviewCoverage, ReviewExecutionBudget, ReviewLens, ReviewModelCallAudit, ReviewTool, } from "./core/types.js";
|