@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.
Files changed (121) hide show
  1. package/dist/features/background-agent/attempt-lifecycle.d.ts +12 -0
  2. package/dist/features/background-agent/background-task-notification-template.d.ts +2 -1
  3. package/dist/features/background-agent/constants.d.ts +1 -0
  4. package/dist/features/background-agent/fallback-retry-handler.d.ts +8 -0
  5. package/dist/features/background-agent/manager.d.ts +9 -0
  6. package/dist/features/background-agent/types.d.ts +24 -0
  7. package/dist/features/team-mode/types.d.ts +1 -1
  8. package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +1 -1
  9. package/dist/hooks/model-fallback/controller-accessor.d.ts +1 -0
  10. package/dist/hooks/model-fallback/fallback-state-controller.d.ts +1 -0
  11. package/dist/hooks/model-fallback/hook.d.ts +2 -1
  12. package/dist/hooks/preemptive-compaction-degradation-monitor.d.ts +1 -0
  13. package/dist/hooks/preemptive-compaction-no-text-tail.d.ts +1 -0
  14. package/dist/index.js +1433 -5528
  15. package/dist/plugin/event.d.ts +1 -0
  16. package/dist/{cli/config-manager → shared}/config-context.d.ts +1 -1
  17. package/dist/shared/dynamic-truncator.d.ts +9 -10
  18. package/dist/shared/model-error-classifier.d.ts +2 -2
  19. package/dist/tools/background-task/clients.d.ts +1 -0
  20. package/dist/tools/delegate-task/builtin-categories.d.ts +1 -0
  21. package/dist/tools/delegate-task/builtin-category-definition.d.ts +1 -0
  22. package/dist/tools/delegate-task/constants.d.ts +1 -1
  23. package/dist/tools/delegate-task/executor-types.d.ts +1 -0
  24. package/dist/tools/delegate-task/openai-categories.d.ts +3 -0
  25. package/dist/tools/delegate-task/sync-task-fallback.d.ts +3 -0
  26. package/package.json +8 -8
  27. package/dist/cli/cli-installer.d.ts +0 -2
  28. package/dist/cli/cli-program.d.ts +0 -1
  29. package/dist/cli/config-manager/add-plugin-to-opencode-config.d.ts +0 -2
  30. package/dist/cli/config-manager/backup-config.d.ts +0 -6
  31. package/dist/cli/config-manager/deep-merge-record.d.ts +0 -1
  32. package/dist/cli/config-manager/detect-current-config.d.ts +0 -2
  33. package/dist/cli/config-manager/ensure-config-directory-exists.d.ts +0 -1
  34. package/dist/cli/config-manager/format-error-with-suggestion.d.ts +0 -1
  35. package/dist/cli/config-manager/generate-omo-config.d.ts +0 -2
  36. package/dist/cli/config-manager/npm-dist-tags.d.ts +0 -7
  37. package/dist/cli/config-manager/opencode-binary.d.ts +0 -2
  38. package/dist/cli/config-manager/opencode-config-format.d.ts +0 -5
  39. package/dist/cli/config-manager/parse-opencode-config-file.d.ts +0 -10
  40. package/dist/cli/config-manager/plugin-name-with-version.d.ts +0 -1
  41. package/dist/cli/config-manager/version-compatibility.d.ts +0 -9
  42. package/dist/cli/config-manager/write-omo-config.d.ts +0 -2
  43. package/dist/cli/config-manager.d.ts +0 -15
  44. package/dist/cli/doctor/checks/config.d.ts +0 -2
  45. package/dist/cli/doctor/checks/dependencies.d.ts +0 -4
  46. package/dist/cli/doctor/checks/index.d.ts +0 -7
  47. package/dist/cli/doctor/checks/model-resolution-cache.d.ts +0 -2
  48. package/dist/cli/doctor/checks/model-resolution-config.d.ts +0 -2
  49. package/dist/cli/doctor/checks/model-resolution-details.d.ts +0 -6
  50. package/dist/cli/doctor/checks/model-resolution-effective-model.d.ts +0 -3
  51. package/dist/cli/doctor/checks/model-resolution-types.d.ts +0 -40
  52. package/dist/cli/doctor/checks/model-resolution-variant.d.ts +0 -5
  53. package/dist/cli/doctor/checks/model-resolution.d.ts +0 -11
  54. package/dist/cli/doctor/checks/system-binary.d.ts +0 -13
  55. package/dist/cli/doctor/checks/system-loaded-version.d.ts +0 -10
  56. package/dist/cli/doctor/checks/system-plugin.d.ts +0 -15
  57. package/dist/cli/doctor/checks/system.d.ts +0 -16
  58. package/dist/cli/doctor/checks/tools-gh.d.ts +0 -10
  59. package/dist/cli/doctor/checks/tools-lsp.d.ts +0 -4
  60. package/dist/cli/doctor/checks/tools-mcp.d.ts +0 -3
  61. package/dist/cli/doctor/checks/tools.d.ts +0 -3
  62. package/dist/cli/doctor/constants.d.ts +0 -29
  63. package/dist/cli/doctor/format-default.d.ts +0 -2
  64. package/dist/cli/doctor/format-shared.d.ts +0 -6
  65. package/dist/cli/doctor/format-status.d.ts +0 -2
  66. package/dist/cli/doctor/format-verbose.d.ts +0 -2
  67. package/dist/cli/doctor/formatter.d.ts +0 -3
  68. package/dist/cli/doctor/index.d.ts +0 -5
  69. package/dist/cli/doctor/runner.d.ts +0 -5
  70. package/dist/cli/doctor/spawn-with-timeout.d.ts +0 -8
  71. package/dist/cli/doctor/types.d.ts +0 -120
  72. package/dist/cli/fallback-chain-resolution.d.ts +0 -10
  73. package/dist/cli/get-local-version/formatter.d.ts +0 -3
  74. package/dist/cli/get-local-version/get-local-version.d.ts +0 -2
  75. package/dist/cli/get-local-version/index.d.ts +0 -2
  76. package/dist/cli/get-local-version/types.d.ts +0 -13
  77. package/dist/cli/index.d.ts +0 -2
  78. package/dist/cli/install-validators.d.ts +0 -34
  79. package/dist/cli/install.d.ts +0 -2
  80. package/dist/cli/mcp-oauth/index.d.ts +0 -6
  81. package/dist/cli/mcp-oauth/login.d.ts +0 -11
  82. package/dist/cli/mcp-oauth/logout.d.ts +0 -4
  83. package/dist/cli/mcp-oauth/status.d.ts +0 -1
  84. package/dist/cli/minimum-opencode-version.d.ts +0 -1
  85. package/dist/cli/model-fallback-requirements.d.ts +0 -3
  86. package/dist/cli/model-fallback-types.d.ts +0 -31
  87. package/dist/cli/model-fallback.d.ts +0 -5
  88. package/dist/cli/openai-only-model-catalog.d.ts +0 -3
  89. package/dist/cli/provider-availability.d.ts +0 -4
  90. package/dist/cli/provider-model-id-transform.d.ts +0 -1
  91. package/dist/cli/refresh-model-capabilities.d.ts +0 -15
  92. package/dist/cli/run/agent-profile-colors.d.ts +0 -2
  93. package/dist/cli/run/agent-resolver.d.ts +0 -5
  94. package/dist/cli/run/completion.d.ts +0 -2
  95. package/dist/cli/run/continuation-state.d.ts +0 -10
  96. package/dist/cli/run/display-chars.d.ts +0 -5
  97. package/dist/cli/run/event-formatting.d.ts +0 -3
  98. package/dist/cli/run/event-handlers.d.ts +0 -11
  99. package/dist/cli/run/event-state.d.ts +0 -47
  100. package/dist/cli/run/event-stream-processor.d.ts +0 -3
  101. package/dist/cli/run/events.d.ts +0 -4
  102. package/dist/cli/run/index.d.ts +0 -10
  103. package/dist/cli/run/json-output.d.ts +0 -12
  104. package/dist/cli/run/model-resolver.d.ts +0 -4
  105. package/dist/cli/run/on-complete-hook.d.ts +0 -7
  106. package/dist/cli/run/opencode-binary-resolver.d.ts +0 -5
  107. package/dist/cli/run/output-renderer.d.ts +0 -7
  108. package/dist/cli/run/poll-for-completion.d.ts +0 -10
  109. package/dist/cli/run/runner.d.ts +0 -5
  110. package/dist/cli/run/server-connection.d.ts +0 -6
  111. package/dist/cli/run/session-resolver.d.ts +0 -6
  112. package/dist/cli/run/stdin-suppression.d.ts +0 -12
  113. package/dist/cli/run/timestamp-output.d.ts +0 -5
  114. package/dist/cli/run/tool-input-preview.d.ts +0 -6
  115. package/dist/cli/run/types.d.ts +0 -131
  116. package/dist/cli/tui-install-prompts.d.ts +0 -2
  117. package/dist/cli/tui-installer.d.ts +0 -2
  118. package/dist/cli/types.d.ts +0 -46
  119. package/dist/shared/posthog-activity-state.d.ts +0 -11
  120. package/dist/shared/posthog.d.ts +0 -19
  121. /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,3 +0,0 @@
1
- import type { VersionInfo } from "./types";
2
- export declare function formatVersionOutput(info: VersionInfo): string;
3
- export declare function formatJsonOutput(info: VersionInfo): string;
@@ -1,2 +0,0 @@
1
- import type { GetLocalVersionOptions } from "./types";
2
- export declare function getLocalVersion(options?: GetLocalVersionOptions): Promise<number>;
@@ -1,2 +0,0 @@
1
- export { getLocalVersion } from "./get-local-version";
2
- export * from "./types";
@@ -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
- }
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env bun
2
- export {};
@@ -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
- };
@@ -1,2 +0,0 @@
1
- import type { InstallArgs } from "./types";
2
- export declare function install(args: InstallArgs): Promise<number>;
@@ -1,6 +0,0 @@
1
- import { Command } from "commander";
2
- import { login } from "./login";
3
- import { logout } from "./logout";
4
- import { status } from "./status";
5
- export declare function createMcpOAuthCommand(): Command;
6
- export { login, logout, status };
@@ -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,4 +0,0 @@
1
- export interface LogoutOptions {
2
- serverUrl?: string;
3
- }
4
- export declare function logout(serverName: string, options?: LogoutOptions): 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,3 +0,0 @@
1
- import { type ModelRequirement } from "../shared/model-requirements";
2
- export declare const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement>;
3
- export declare const CLI_CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement>;
@@ -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,2 +0,0 @@
1
- import type { OpencodeClient } from "@opencode-ai/sdk";
2
- export declare function loadAgentProfileColors(client: OpencodeClient): Promise<Record<string, string>>;
@@ -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,2 +0,0 @@
1
- import type { RunContext } from "./types";
2
- export declare function checkCompletionConditions(ctx: RunContext): Promise<boolean>;
@@ -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,5 +0,0 @@
1
- export declare const displayChars: {
2
- readonly treeEnd: "`-" | "└─";
3
- readonly treeIndent: " ";
4
- readonly treeJoin: " " | " ";
5
- };
@@ -1,3 +0,0 @@
1
- import type { RunContext, EventPayload } from "./types";
2
- export declare function serializeError(error: unknown): string;
3
- export declare function logEventVerbose(ctx: RunContext, payload: EventPayload): void;
@@ -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;
@@ -1,3 +0,0 @@
1
- import type { RunContext } from "./types";
2
- import type { EventState } from "./event-state";
3
- export declare function processEvents(ctx: RunContext, stream: AsyncIterable<unknown>, state: EventState): Promise<void>;
@@ -1,4 +0,0 @@
1
- export type { EventState } from "./event-state";
2
- export { createEventState } from "./event-state";
3
- export { serializeError } from "./event-formatting";
4
- export { processEvents } from "./event-stream-processor";
@@ -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,4 +0,0 @@
1
- export declare function resolveRunModel(modelString?: string): {
2
- providerID: string;
3
- modelID: string;
4
- } | undefined;
@@ -1,7 +0,0 @@
1
- export declare function executeOnCompleteHook(options: {
2
- command: string;
3
- sessionId: string;
4
- exitCode: number;
5
- durationMs: number;
6
- messageCount: number;
7
- }): Promise<void>;
@@ -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>;
@@ -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,6 +0,0 @@
1
- import type { ServerConnection } from "./types";
2
- export declare function createServerConnection(options: {
3
- port?: number;
4
- attach?: string;
5
- signal: AbortSignal;
6
- }): Promise<ServerConnection>;
@@ -1,6 +0,0 @@
1
- import type { OpencodeClient } from "./types";
2
- export declare function resolveSession(options: {
3
- client: OpencodeClient;
4
- sessionId?: string;
5
- directory: string;
6
- }): Promise<string>;
@@ -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 {};
@@ -1,5 +0,0 @@
1
- export declare function createTimestampTransformer(now?: () => Date): (chunk: string) => string;
2
- export declare function createTimestampedStdoutController(stdout?: NodeJS.WriteStream): {
3
- enable: () => void;
4
- restore: () => void;
5
- };
@@ -1,6 +0,0 @@
1
- export interface ToolHeader {
2
- icon: string;
3
- title: string;
4
- description?: string;
5
- }
6
- export declare function formatToolHeader(toolName: string, input: Record<string, unknown>): ToolHeader;