@wolfx/oh-my-openagent 3.17.6 → 3.17.10
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/dist/features/background-agent/attempt-lifecycle.d.ts +12 -0
- package/dist/features/background-agent/background-task-notification-template.d.ts +2 -1
- package/dist/features/background-agent/constants.d.ts +1 -0
- package/dist/features/background-agent/fallback-retry-handler.d.ts +8 -0
- package/dist/features/background-agent/manager.d.ts +9 -0
- package/dist/features/background-agent/types.d.ts +24 -0
- package/dist/features/team-mode/types.d.ts +1 -1
- package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +1 -1
- package/dist/hooks/model-fallback/controller-accessor.d.ts +1 -0
- package/dist/hooks/model-fallback/fallback-state-controller.d.ts +1 -0
- package/dist/hooks/model-fallback/hook.d.ts +2 -1
- package/dist/hooks/preemptive-compaction-degradation-monitor.d.ts +1 -0
- package/dist/hooks/preemptive-compaction-no-text-tail.d.ts +1 -0
- package/dist/index.js +1433 -5528
- package/dist/plugin/event.d.ts +1 -0
- package/dist/{cli/config-manager → shared}/config-context.d.ts +1 -1
- package/dist/shared/dynamic-truncator.d.ts +9 -10
- package/dist/shared/model-error-classifier.d.ts +2 -2
- package/dist/tools/background-task/clients.d.ts +1 -0
- package/dist/tools/delegate-task/builtin-categories.d.ts +1 -0
- package/dist/tools/delegate-task/builtin-category-definition.d.ts +1 -0
- package/dist/tools/delegate-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/executor-types.d.ts +1 -0
- package/dist/tools/delegate-task/openai-categories.d.ts +3 -0
- package/dist/tools/delegate-task/sync-task-fallback.d.ts +3 -0
- package/package.json +8 -8
- package/dist/cli/cli-installer.d.ts +0 -2
- package/dist/cli/cli-program.d.ts +0 -1
- package/dist/cli/config-manager/add-plugin-to-opencode-config.d.ts +0 -2
- package/dist/cli/config-manager/backup-config.d.ts +0 -6
- package/dist/cli/config-manager/deep-merge-record.d.ts +0 -1
- package/dist/cli/config-manager/detect-current-config.d.ts +0 -2
- package/dist/cli/config-manager/ensure-config-directory-exists.d.ts +0 -1
- package/dist/cli/config-manager/format-error-with-suggestion.d.ts +0 -1
- package/dist/cli/config-manager/generate-omo-config.d.ts +0 -2
- package/dist/cli/config-manager/npm-dist-tags.d.ts +0 -7
- package/dist/cli/config-manager/opencode-binary.d.ts +0 -2
- package/dist/cli/config-manager/opencode-config-format.d.ts +0 -5
- package/dist/cli/config-manager/parse-opencode-config-file.d.ts +0 -10
- package/dist/cli/config-manager/plugin-name-with-version.d.ts +0 -1
- package/dist/cli/config-manager/version-compatibility.d.ts +0 -9
- package/dist/cli/config-manager/write-omo-config.d.ts +0 -2
- package/dist/cli/config-manager.d.ts +0 -15
- package/dist/cli/doctor/checks/config.d.ts +0 -2
- package/dist/cli/doctor/checks/dependencies.d.ts +0 -4
- package/dist/cli/doctor/checks/index.d.ts +0 -7
- package/dist/cli/doctor/checks/model-resolution-cache.d.ts +0 -2
- package/dist/cli/doctor/checks/model-resolution-config.d.ts +0 -2
- package/dist/cli/doctor/checks/model-resolution-details.d.ts +0 -6
- package/dist/cli/doctor/checks/model-resolution-effective-model.d.ts +0 -3
- package/dist/cli/doctor/checks/model-resolution-types.d.ts +0 -40
- package/dist/cli/doctor/checks/model-resolution-variant.d.ts +0 -5
- package/dist/cli/doctor/checks/model-resolution.d.ts +0 -11
- package/dist/cli/doctor/checks/system-binary.d.ts +0 -13
- package/dist/cli/doctor/checks/system-loaded-version.d.ts +0 -10
- package/dist/cli/doctor/checks/system-plugin.d.ts +0 -15
- package/dist/cli/doctor/checks/system.d.ts +0 -16
- package/dist/cli/doctor/checks/tools-gh.d.ts +0 -10
- package/dist/cli/doctor/checks/tools-lsp.d.ts +0 -4
- package/dist/cli/doctor/checks/tools-mcp.d.ts +0 -3
- package/dist/cli/doctor/checks/tools.d.ts +0 -3
- package/dist/cli/doctor/constants.d.ts +0 -29
- package/dist/cli/doctor/format-default.d.ts +0 -2
- package/dist/cli/doctor/format-shared.d.ts +0 -6
- package/dist/cli/doctor/format-status.d.ts +0 -2
- package/dist/cli/doctor/format-verbose.d.ts +0 -2
- package/dist/cli/doctor/formatter.d.ts +0 -3
- package/dist/cli/doctor/index.d.ts +0 -5
- package/dist/cli/doctor/runner.d.ts +0 -5
- package/dist/cli/doctor/spawn-with-timeout.d.ts +0 -8
- package/dist/cli/doctor/types.d.ts +0 -120
- package/dist/cli/fallback-chain-resolution.d.ts +0 -10
- package/dist/cli/get-local-version/formatter.d.ts +0 -3
- package/dist/cli/get-local-version/get-local-version.d.ts +0 -2
- package/dist/cli/get-local-version/index.d.ts +0 -2
- package/dist/cli/get-local-version/types.d.ts +0 -13
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/install-validators.d.ts +0 -34
- package/dist/cli/install.d.ts +0 -2
- package/dist/cli/mcp-oauth/index.d.ts +0 -6
- package/dist/cli/mcp-oauth/login.d.ts +0 -11
- package/dist/cli/mcp-oauth/logout.d.ts +0 -4
- package/dist/cli/mcp-oauth/status.d.ts +0 -1
- package/dist/cli/minimum-opencode-version.d.ts +0 -1
- package/dist/cli/model-fallback-requirements.d.ts +0 -3
- package/dist/cli/model-fallback-types.d.ts +0 -31
- package/dist/cli/model-fallback.d.ts +0 -5
- package/dist/cli/openai-only-model-catalog.d.ts +0 -3
- package/dist/cli/provider-availability.d.ts +0 -4
- package/dist/cli/provider-model-id-transform.d.ts +0 -1
- package/dist/cli/refresh-model-capabilities.d.ts +0 -15
- package/dist/cli/run/agent-profile-colors.d.ts +0 -2
- package/dist/cli/run/agent-resolver.d.ts +0 -5
- package/dist/cli/run/completion.d.ts +0 -2
- package/dist/cli/run/continuation-state.d.ts +0 -10
- package/dist/cli/run/display-chars.d.ts +0 -5
- package/dist/cli/run/event-formatting.d.ts +0 -3
- package/dist/cli/run/event-handlers.d.ts +0 -11
- package/dist/cli/run/event-state.d.ts +0 -47
- package/dist/cli/run/event-stream-processor.d.ts +0 -3
- package/dist/cli/run/events.d.ts +0 -4
- package/dist/cli/run/index.d.ts +0 -10
- package/dist/cli/run/json-output.d.ts +0 -12
- package/dist/cli/run/model-resolver.d.ts +0 -4
- package/dist/cli/run/on-complete-hook.d.ts +0 -7
- package/dist/cli/run/opencode-binary-resolver.d.ts +0 -5
- package/dist/cli/run/output-renderer.d.ts +0 -7
- package/dist/cli/run/poll-for-completion.d.ts +0 -10
- package/dist/cli/run/runner.d.ts +0 -5
- package/dist/cli/run/server-connection.d.ts +0 -6
- package/dist/cli/run/session-resolver.d.ts +0 -6
- package/dist/cli/run/stdin-suppression.d.ts +0 -12
- package/dist/cli/run/timestamp-output.d.ts +0 -5
- package/dist/cli/run/tool-input-preview.d.ts +0 -6
- package/dist/cli/run/types.d.ts +0 -131
- package/dist/cli/tui-install-prompts.d.ts +0 -2
- package/dist/cli/tui-installer.d.ts +0 -2
- package/dist/cli/types.d.ts +0 -46
- package/dist/shared/posthog-activity-state.d.ts +0 -11
- package/dist/shared/posthog.d.ts +0 -19
- /package/dist/{cli/config-manager → shared}/bun-install.d.ts +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
export type DoctorMode = "default" | "status" | "verbose";
|
|
2
|
-
export interface DoctorOptions {
|
|
3
|
-
mode: DoctorMode;
|
|
4
|
-
json?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface DoctorIssue {
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
fix?: string;
|
|
10
|
-
affects?: string[];
|
|
11
|
-
severity: "error" | "warning";
|
|
12
|
-
}
|
|
13
|
-
export type CheckStatus = "pass" | "fail" | "warn" | "skip";
|
|
14
|
-
export interface CheckResult {
|
|
15
|
-
name: string;
|
|
16
|
-
status: CheckStatus;
|
|
17
|
-
message: string;
|
|
18
|
-
details?: string[];
|
|
19
|
-
issues: DoctorIssue[];
|
|
20
|
-
duration?: number;
|
|
21
|
-
}
|
|
22
|
-
export type CheckFunction = () => Promise<CheckResult>;
|
|
23
|
-
export interface CheckDefinition {
|
|
24
|
-
id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
check: CheckFunction;
|
|
27
|
-
critical?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface SystemInfo {
|
|
30
|
-
opencodeVersion: string | null;
|
|
31
|
-
opencodePath: string | null;
|
|
32
|
-
pluginVersion: string | null;
|
|
33
|
-
loadedVersion: string | null;
|
|
34
|
-
bunVersion: string | null;
|
|
35
|
-
configPath: string | null;
|
|
36
|
-
configValid: boolean;
|
|
37
|
-
isLocalDev: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface ToolsSummary {
|
|
40
|
-
lspServers: Array<{
|
|
41
|
-
id: string;
|
|
42
|
-
extensions: string[];
|
|
43
|
-
}>;
|
|
44
|
-
astGrepCli: boolean;
|
|
45
|
-
astGrepNapi: boolean;
|
|
46
|
-
commentChecker: boolean;
|
|
47
|
-
ghCli: {
|
|
48
|
-
installed: boolean;
|
|
49
|
-
authenticated: boolean;
|
|
50
|
-
username: string | null;
|
|
51
|
-
};
|
|
52
|
-
mcpBuiltin: string[];
|
|
53
|
-
mcpUser: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface DoctorSummary {
|
|
56
|
-
total: number;
|
|
57
|
-
passed: number;
|
|
58
|
-
failed: number;
|
|
59
|
-
warnings: number;
|
|
60
|
-
skipped: number;
|
|
61
|
-
duration: number;
|
|
62
|
-
}
|
|
63
|
-
export interface DoctorResult {
|
|
64
|
-
results: CheckResult[];
|
|
65
|
-
systemInfo: SystemInfo;
|
|
66
|
-
tools: ToolsSummary;
|
|
67
|
-
summary: DoctorSummary;
|
|
68
|
-
exitCode: number;
|
|
69
|
-
}
|
|
70
|
-
export type CheckCategory = "installation" | "configuration" | "authentication" | "dependencies" | "tools" | "updates";
|
|
71
|
-
export interface OpenCodeInfo {
|
|
72
|
-
installed: boolean;
|
|
73
|
-
version: string | null;
|
|
74
|
-
path: string | null;
|
|
75
|
-
binary: "opencode" | "opencode-desktop" | null;
|
|
76
|
-
}
|
|
77
|
-
export interface PluginInfo {
|
|
78
|
-
registered: boolean;
|
|
79
|
-
configPath: string | null;
|
|
80
|
-
entry: string | null;
|
|
81
|
-
isPinned: boolean;
|
|
82
|
-
pinnedVersion: string | null;
|
|
83
|
-
}
|
|
84
|
-
export interface ConfigInfo {
|
|
85
|
-
exists: boolean;
|
|
86
|
-
path: string | null;
|
|
87
|
-
format: "json" | "jsonc" | null;
|
|
88
|
-
valid: boolean;
|
|
89
|
-
errors: string[];
|
|
90
|
-
}
|
|
91
|
-
export type AuthProviderId = "anthropic" | "openai" | "google";
|
|
92
|
-
export interface AuthProviderInfo {
|
|
93
|
-
id: AuthProviderId;
|
|
94
|
-
name: string;
|
|
95
|
-
pluginInstalled: boolean;
|
|
96
|
-
configured: boolean;
|
|
97
|
-
error?: string;
|
|
98
|
-
}
|
|
99
|
-
export interface DependencyInfo {
|
|
100
|
-
name: string;
|
|
101
|
-
required: boolean;
|
|
102
|
-
installed: boolean;
|
|
103
|
-
version: string | null;
|
|
104
|
-
path: string | null;
|
|
105
|
-
installHint?: string;
|
|
106
|
-
}
|
|
107
|
-
export interface McpServerInfo {
|
|
108
|
-
id: string;
|
|
109
|
-
type: "builtin" | "user";
|
|
110
|
-
enabled: boolean;
|
|
111
|
-
valid: boolean;
|
|
112
|
-
error?: string;
|
|
113
|
-
}
|
|
114
|
-
export interface VersionCheckInfo {
|
|
115
|
-
currentVersion: string | null;
|
|
116
|
-
latestVersion: string | null;
|
|
117
|
-
isUpToDate: boolean;
|
|
118
|
-
isLocalDev: boolean;
|
|
119
|
-
isPinned: boolean;
|
|
120
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FallbackEntry } from "../shared/model-requirements";
|
|
2
|
-
import type { ProviderAvailability } from "./model-fallback-types";
|
|
3
|
-
export declare function resolveModelFromChain(fallbackChain: FallbackEntry[], availability: ProviderAvailability): {
|
|
4
|
-
model: string;
|
|
5
|
-
variant?: string;
|
|
6
|
-
} | null;
|
|
7
|
-
export declare function getSisyphusFallbackChain(): FallbackEntry[];
|
|
8
|
-
export declare function isAnyFallbackEntryAvailable(fallbackChain: FallbackEntry[], availability: ProviderAvailability): boolean;
|
|
9
|
-
export declare function isRequiredModelAvailable(requiresModel: string, fallbackChain: FallbackEntry[], availability: ProviderAvailability): boolean;
|
|
10
|
-
export declare function isRequiredProviderAvailable(requiredProviders: string[], availability: ProviderAvailability): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface VersionInfo {
|
|
2
|
-
currentVersion: string | null;
|
|
3
|
-
latestVersion: string | null;
|
|
4
|
-
isUpToDate: boolean;
|
|
5
|
-
isLocalDev: boolean;
|
|
6
|
-
isPinned: boolean;
|
|
7
|
-
pinnedVersion: string | null;
|
|
8
|
-
status: "up-to-date" | "outdated" | "local-dev" | "pinned" | "error" | "unknown";
|
|
9
|
-
}
|
|
10
|
-
export interface GetLocalVersionOptions {
|
|
11
|
-
directory?: string;
|
|
12
|
-
json?: boolean;
|
|
13
|
-
}
|
package/dist/cli/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { BooleanArg, ClaudeSubscription, DetectedConfig, InstallArgs, InstallConfig } from "./types";
|
|
2
|
-
export declare const SYMBOLS: {
|
|
3
|
-
check: string;
|
|
4
|
-
cross: string;
|
|
5
|
-
arrow: string;
|
|
6
|
-
bullet: string;
|
|
7
|
-
info: string;
|
|
8
|
-
warn: string;
|
|
9
|
-
star: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function formatConfigSummary(config: InstallConfig): string;
|
|
12
|
-
export declare function printHeader(isUpdate: boolean): void;
|
|
13
|
-
export declare function printStep(step: number, total: number, message: string): void;
|
|
14
|
-
export declare function printSuccess(message: string): void;
|
|
15
|
-
export declare function printError(message: string): void;
|
|
16
|
-
export declare function printInfo(message: string): void;
|
|
17
|
-
export declare function printWarning(message: string): void;
|
|
18
|
-
export declare function printBox(content: string, title?: string): void;
|
|
19
|
-
export declare function validateNonTuiArgs(args: InstallArgs): {
|
|
20
|
-
valid: boolean;
|
|
21
|
-
errors: string[];
|
|
22
|
-
};
|
|
23
|
-
export declare function argsToConfig(args: InstallArgs): InstallConfig;
|
|
24
|
-
export declare function detectedToInitialValues(detected: DetectedConfig): {
|
|
25
|
-
claude: ClaudeSubscription;
|
|
26
|
-
openai: BooleanArg;
|
|
27
|
-
gemini: BooleanArg;
|
|
28
|
-
copilot: BooleanArg;
|
|
29
|
-
opencodeZen: BooleanArg;
|
|
30
|
-
zaiCodingPlan: BooleanArg;
|
|
31
|
-
kimiForCoding: BooleanArg;
|
|
32
|
-
opencodeGo: BooleanArg;
|
|
33
|
-
vercelAiGateway: BooleanArg;
|
|
34
|
-
};
|
package/dist/cli/install.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { McpOAuthProvider } from "../../features/mcp-oauth/provider";
|
|
2
|
-
export interface LoginOptions {
|
|
3
|
-
serverUrl?: string;
|
|
4
|
-
clientId?: string;
|
|
5
|
-
scopes?: string[];
|
|
6
|
-
}
|
|
7
|
-
export type McpOAuthProviderLike = Pick<McpOAuthProvider, "login">;
|
|
8
|
-
export interface LoginDependencies {
|
|
9
|
-
createProvider: (options: Required<Pick<LoginOptions, "serverUrl">> & Omit<LoginOptions, "serverUrl">) => McpOAuthProviderLike;
|
|
10
|
-
}
|
|
11
|
-
export declare function login(serverName: string, options: LoginOptions, deps?: LoginDependencies): Promise<number>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function status(serverName: string | undefined): Promise<number>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getUnsupportedOpenCodeVersionMessage(openCodeVersion: string | null): string | null;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FallbackModelObject } from "../config/schema/fallback-models";
|
|
2
|
-
export interface ProviderAvailability {
|
|
3
|
-
native: {
|
|
4
|
-
claude: boolean;
|
|
5
|
-
openai: boolean;
|
|
6
|
-
gemini: boolean;
|
|
7
|
-
};
|
|
8
|
-
opencodeZen: boolean;
|
|
9
|
-
copilot: boolean;
|
|
10
|
-
zai: boolean;
|
|
11
|
-
kimiForCoding: boolean;
|
|
12
|
-
opencodeGo: boolean;
|
|
13
|
-
vercelAiGateway: boolean;
|
|
14
|
-
isMaxPlan: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface AgentConfig {
|
|
17
|
-
model: string;
|
|
18
|
-
variant?: string;
|
|
19
|
-
fallback_models?: FallbackModelObject[];
|
|
20
|
-
}
|
|
21
|
-
export interface CategoryConfig {
|
|
22
|
-
model: string;
|
|
23
|
-
variant?: string;
|
|
24
|
-
fallback_models?: FallbackModelObject[];
|
|
25
|
-
}
|
|
26
|
-
export interface GeneratedOmoConfig {
|
|
27
|
-
$schema: string;
|
|
28
|
-
agents?: Record<string, AgentConfig>;
|
|
29
|
-
categories?: Record<string, CategoryConfig>;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { InstallConfig } from "./types";
|
|
2
|
-
import type { GeneratedOmoConfig } from "./model-fallback-types";
|
|
3
|
-
export type { GeneratedOmoConfig } from "./model-fallback-types";
|
|
4
|
-
export declare function generateModelConfig(config: InstallConfig): GeneratedOmoConfig;
|
|
5
|
-
export declare function shouldShowChatGPTOnlyWarning(config: InstallConfig): boolean;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { GeneratedOmoConfig, ProviderAvailability } from "./model-fallback-types";
|
|
2
|
-
export declare function isOpenAiOnlyAvailability(availability: ProviderAvailability): boolean;
|
|
3
|
-
export declare function applyOpenAiOnlyModelCatalog(config: GeneratedOmoConfig): GeneratedOmoConfig;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { InstallConfig } from "./types";
|
|
2
|
-
import type { ProviderAvailability } from "./model-fallback-types";
|
|
3
|
-
export declare function toProviderAvailability(config: InstallConfig): ProviderAvailability;
|
|
4
|
-
export declare function isProviderAvailable(provider: string, availability: ProviderAvailability): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function transformModelForProvider(provider: string, model: string): string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { loadPluginConfig } from "../plugin-config";
|
|
2
|
-
import { refreshModelCapabilitiesCache } from "../shared/model-capabilities-cache";
|
|
3
|
-
export type RefreshModelCapabilitiesOptions = {
|
|
4
|
-
directory?: string;
|
|
5
|
-
json?: boolean;
|
|
6
|
-
sourceUrl?: string;
|
|
7
|
-
};
|
|
8
|
-
type RefreshModelCapabilitiesDeps = {
|
|
9
|
-
loadConfig?: typeof loadPluginConfig;
|
|
10
|
-
refreshCache?: typeof refreshModelCapabilitiesCache;
|
|
11
|
-
stdout?: Pick<typeof process.stdout, "write">;
|
|
12
|
-
stderr?: Pick<typeof process.stderr, "write">;
|
|
13
|
-
};
|
|
14
|
-
export declare function refreshModelCapabilities(options: RefreshModelCapabilitiesOptions, deps?: RefreshModelCapabilitiesDeps): Promise<number>;
|
|
15
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RunOptions } from "./types";
|
|
2
|
-
import type { OhMyOpenCodeConfig } from "../../config";
|
|
3
|
-
type EnvVars = Record<string, string | undefined>;
|
|
4
|
-
export declare const resolveRunAgent: (options: RunOptions, pluginConfig: OhMyOpenCodeConfig, env?: EnvVars) => string;
|
|
5
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RunContext } from "./types";
|
|
2
|
-
export interface ContinuationState {
|
|
3
|
-
hasActiveBoulder: boolean;
|
|
4
|
-
hasActiveRalphLoop: boolean;
|
|
5
|
-
hasHookMarker: boolean;
|
|
6
|
-
hasTodoHookMarker: boolean;
|
|
7
|
-
hasActiveHookMarker: boolean;
|
|
8
|
-
activeHookMarkerReason: string | null;
|
|
9
|
-
}
|
|
10
|
-
export declare function getContinuationState(directory: string, sessionID: string, client?: RunContext["client"]): Promise<ContinuationState>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RunContext, EventPayload } from "./types";
|
|
2
|
-
import type { EventState } from "./event-state";
|
|
3
|
-
export declare function handleSessionIdle(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
4
|
-
export declare function handleSessionStatus(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
5
|
-
export declare function handleSessionError(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
6
|
-
export declare function handleMessagePartUpdated(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
7
|
-
export declare function handleMessagePartDelta(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
8
|
-
export declare function handleMessageUpdated(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
9
|
-
export declare function handleToolExecute(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
10
|
-
export declare function handleToolResult(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
11
|
-
export declare function handleTuiToast(_ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export interface EventState {
|
|
2
|
-
mainSessionIdle: boolean;
|
|
3
|
-
mainSessionError: boolean;
|
|
4
|
-
lastError: string | null;
|
|
5
|
-
lastOutput: string;
|
|
6
|
-
lastPartText: string;
|
|
7
|
-
currentTool: string | null;
|
|
8
|
-
/** Set to true when the main session has produced meaningful work (text, tool call, or tool result) */
|
|
9
|
-
hasReceivedMeaningfulWork: boolean;
|
|
10
|
-
/** Timestamp of the last received event (for watchdog detection) */
|
|
11
|
-
lastEventTimestamp: number;
|
|
12
|
-
/** Count of assistant messages for the main session */
|
|
13
|
-
messageCount: number;
|
|
14
|
-
/** Current agent name from the latest assistant message */
|
|
15
|
-
currentAgent: string | null;
|
|
16
|
-
/** Current model ID from the latest assistant message */
|
|
17
|
-
currentModel: string | null;
|
|
18
|
-
/** Current model variant from the latest assistant message */
|
|
19
|
-
currentVariant: string | null;
|
|
20
|
-
currentMessageRole: string | null;
|
|
21
|
-
/** Agent profile colors keyed by display name */
|
|
22
|
-
agentColorsByName: Record<string, string>;
|
|
23
|
-
/** Part type registry keyed by partID (text, reasoning, tool, ...) */
|
|
24
|
-
partTypesById: Record<string, string>;
|
|
25
|
-
/** Whether a THINK block is currently open in output */
|
|
26
|
-
inThinkBlock: boolean;
|
|
27
|
-
/** Tracks streamed reasoning text to avoid duplicates */
|
|
28
|
-
lastReasoningText: string;
|
|
29
|
-
/** Whether compact thinking line already printed for current reasoning block */
|
|
30
|
-
hasPrintedThinkingLine: boolean;
|
|
31
|
-
/** Last rendered thinking line width (for in-place padding updates) */
|
|
32
|
-
lastThinkingLineWidth: number;
|
|
33
|
-
/** Message role lookup by message ID to filter user parts */
|
|
34
|
-
messageRoleById: Record<string, string>;
|
|
35
|
-
/** Last rendered thinking summary (to avoid duplicate re-render) */
|
|
36
|
-
lastThinkingSummary: string;
|
|
37
|
-
/** Whether text stream is currently at line start (for padding) */
|
|
38
|
-
textAtLineStart: boolean;
|
|
39
|
-
/** Whether reasoning stream is currently at line start (for padding) */
|
|
40
|
-
thinkingAtLineStart: boolean;
|
|
41
|
-
currentMessageId: string | null;
|
|
42
|
-
/** Assistant message start timestamp by message ID */
|
|
43
|
-
messageStartedAtById: Record<string, number>;
|
|
44
|
-
/** Prevent duplicate completion metadata lines per message */
|
|
45
|
-
completionMetaPrintedByMessageId: Record<string, boolean>;
|
|
46
|
-
}
|
|
47
|
-
export declare function createEventState(): EventState;
|
package/dist/cli/run/events.d.ts
DELETED
package/dist/cli/run/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { run } from "./runner";
|
|
2
|
-
export { resolveRunAgent } from "./agent-resolver";
|
|
3
|
-
export { resolveRunModel } from "./model-resolver";
|
|
4
|
-
export { createServerConnection } from "./server-connection";
|
|
5
|
-
export { resolveSession } from "./session-resolver";
|
|
6
|
-
export { createJsonOutputManager } from "./json-output";
|
|
7
|
-
export { executeOnCompleteHook } from "./on-complete-hook";
|
|
8
|
-
export { createEventState, processEvents, serializeError } from "./events";
|
|
9
|
-
export type { EventState } from "./events";
|
|
10
|
-
export type { RunOptions, RunContext, RunResult, ServerConnection } from "./types";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RunResult } from "./types";
|
|
2
|
-
export interface JsonOutputManager {
|
|
3
|
-
redirectToStderr: () => void;
|
|
4
|
-
restore: () => void;
|
|
5
|
-
emitResult: (result: RunResult) => void;
|
|
6
|
-
}
|
|
7
|
-
interface JsonOutputManagerOptions {
|
|
8
|
-
stdout?: NodeJS.WriteStream;
|
|
9
|
-
stderr?: NodeJS.WriteStream;
|
|
10
|
-
}
|
|
11
|
-
export declare function createJsonOutputManager(options?: JsonOutputManagerOptions): JsonOutputManager;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function collectCandidateBinaryPaths(pathEnv: string | undefined, which?: (command: string) => string | null | undefined, platform?: NodeJS.Platform): string[];
|
|
2
|
-
export declare function canExecuteBinary(binaryPath: string): Promise<boolean>;
|
|
3
|
-
export declare function findWorkingOpencodeBinary(pathEnv?: string | undefined, probe?: (binaryPath: string) => Promise<boolean>, which?: (command: string) => string | null | undefined, platform?: NodeJS.Platform): Promise<string | null>;
|
|
4
|
-
export declare function buildPathWithBinaryFirst(pathEnv: string | undefined, binaryPath: string): string;
|
|
5
|
-
export declare function withWorkingOpencodePath<T>(startServer: () => Promise<T>, finder?: (pathEnv: string | undefined) => Promise<string | null>): Promise<T>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function renderAgentHeader(agent: string | null, model: string | null, variant: string | null, agentColorsByName: Record<string, string>): void;
|
|
2
|
-
export declare function openThinkBlock(): void;
|
|
3
|
-
export declare function closeThinkBlock(): void;
|
|
4
|
-
export declare function writePaddedText(text: string, atLineStart: boolean): {
|
|
5
|
-
output: string;
|
|
6
|
-
atLineStart: boolean;
|
|
7
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RunContext } from "./types";
|
|
2
|
-
import type { EventState } from "./events";
|
|
3
|
-
export interface PollOptions {
|
|
4
|
-
pollIntervalMs?: number;
|
|
5
|
-
requiredConsecutive?: number;
|
|
6
|
-
minStabilizationMs?: number;
|
|
7
|
-
eventWatchdogMs?: number;
|
|
8
|
-
secondaryMeaningfulWorkTimeoutMs?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare function pollForCompletion(ctx: RunContext, eventState: EventState, abortController: AbortController, options?: PollOptions): Promise<number>;
|
package/dist/cli/run/runner.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RunOptions } from "./types";
|
|
2
|
-
import { resolveRunAgent } from "./agent-resolver";
|
|
3
|
-
export { resolveRunAgent };
|
|
4
|
-
export declare function waitForEventProcessorShutdown(eventProcessor: Promise<void>, timeoutMs?: number): Promise<void>;
|
|
5
|
-
export declare function run(options: RunOptions): Promise<number>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type StdinLike = {
|
|
2
|
-
isTTY?: boolean;
|
|
3
|
-
isRaw?: boolean;
|
|
4
|
-
setRawMode?: (mode: boolean) => void;
|
|
5
|
-
isPaused?: () => boolean;
|
|
6
|
-
resume: () => void;
|
|
7
|
-
pause: () => void;
|
|
8
|
-
on: (event: "data", listener: (chunk: string | Uint8Array) => void) => void;
|
|
9
|
-
removeListener: (event: "data", listener: (chunk: string | Uint8Array) => void) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare function suppressRunInput(stdin?: StdinLike, onInterrupt?: () => void): () => void;
|
|
12
|
-
export {};
|