wave-agent-sdk 1.0.5 → 1.0.6

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 (193) hide show
  1. package/dist/agent.d.ts +23 -1
  2. package/dist/agent.js +34 -4
  3. package/dist/managers/aiManager.d.ts +36 -0
  4. package/dist/managers/aiManager.js +240 -8
  5. package/dist/managers/messageManager.d.ts +1 -3
  6. package/dist/managers/messageManager.js +13 -6
  7. package/dist/managers/slashCommandManager.js +28 -0
  8. package/dist/managers/subagentManager.d.ts +0 -2
  9. package/dist/telemetry/instrumentation.d.ts +1 -1
  10. package/dist/telemetry/instrumentation.js +57 -28
  11. package/dist/tools/bashTool.js +16 -6
  12. package/dist/tools/grepTool.js +11 -3
  13. package/dist/types/index.d.ts +3 -0
  14. package/dist/types/messaging.d.ts +2 -0
  15. package/dist/utils/containerSetup.js +0 -3
  16. package/dist/utils/messageOperations.d.ts +2 -1
  17. package/dist/utils/messageOperations.js +2 -1
  18. package/dist/utils/notificationXml.js +5 -0
  19. package/dist/utils/ripgrep.d.ts +4 -4
  20. package/dist/utils/ripgrep.js +4 -27
  21. package/package.json +20 -8
  22. package/bin/rg +0 -79
  23. package/dist/managers/forkedAgentManager.d.ts +0 -50
  24. package/dist/managers/forkedAgentManager.js +0 -130
  25. package/scripts/install_ripgrep.js +0 -111
  26. package/scripts/postinstall.js +0 -38
  27. package/src/agent.ts +0 -1271
  28. package/src/constants/subagents.ts +0 -4
  29. package/src/constants/toolLimits.ts +0 -15
  30. package/src/constants/tools.ts +0 -24
  31. package/src/core/plugin.ts +0 -237
  32. package/src/core/session.ts +0 -9
  33. package/src/index.ts +0 -38
  34. package/src/managers/MemoryRuleManager.ts +0 -198
  35. package/src/managers/aiManager.ts +0 -2429
  36. package/src/managers/backgroundTaskManager.ts +0 -480
  37. package/src/managers/bangManager.ts +0 -119
  38. package/src/managers/cronManager.ts +0 -401
  39. package/src/managers/foregroundTaskManager.ts +0 -30
  40. package/src/managers/forkedAgentManager.ts +0 -216
  41. package/src/managers/hookManager.ts +0 -1089
  42. package/src/managers/liveConfigManager.ts +0 -445
  43. package/src/managers/lspManager.ts +0 -470
  44. package/src/managers/mcpManager.ts +0 -1010
  45. package/src/managers/messageManager.ts +0 -1184
  46. package/src/managers/messageQueue.ts +0 -157
  47. package/src/managers/permissionManager.ts +0 -1140
  48. package/src/managers/planManager.ts +0 -112
  49. package/src/managers/pluginManager.ts +0 -330
  50. package/src/managers/pluginScopeManager.ts +0 -124
  51. package/src/managers/reversionManager.ts +0 -178
  52. package/src/managers/skillManager.ts +0 -578
  53. package/src/managers/slashCommandManager.ts +0 -564
  54. package/src/managers/subagentManager.ts +0 -915
  55. package/src/managers/toolManager.ts +0 -489
  56. package/src/managers/workflowManager.ts +0 -493
  57. package/src/prompts/autoMemory.ts +0 -33
  58. package/src/prompts/autoMemoryExtraction.ts +0 -146
  59. package/src/prompts/index.ts +0 -506
  60. package/src/prompts/planModeReminders.ts +0 -126
  61. package/src/services/GitService.ts +0 -131
  62. package/src/services/MarketplaceService.ts +0 -1052
  63. package/src/services/MemoryRuleService.ts +0 -71
  64. package/src/services/aiService.ts +0 -919
  65. package/src/services/authService.ts +0 -565
  66. package/src/services/autoMemoryService.ts +0 -280
  67. package/src/services/configurationService.ts +0 -1520
  68. package/src/services/fileWatcher.ts +0 -319
  69. package/src/services/hook.ts +0 -348
  70. package/src/services/initializationService.ts +0 -357
  71. package/src/services/interactionService.ts +0 -229
  72. package/src/services/jsonlHandler.ts +0 -295
  73. package/src/services/memory.ts +0 -234
  74. package/src/services/pluginLoader.ts +0 -252
  75. package/src/services/remoteSettingsService.ts +0 -366
  76. package/src/services/reversionService.ts +0 -122
  77. package/src/services/session.ts +0 -917
  78. package/src/services/taskManager.ts +0 -321
  79. package/src/telemetry/events.ts +0 -65
  80. package/src/telemetry/instrumentation.ts +0 -499
  81. package/src/telemetry/sessionTracing.ts +0 -348
  82. package/src/tools/agentTool.ts +0 -322
  83. package/src/tools/askUserQuestion.ts +0 -160
  84. package/src/tools/bashTool.ts +0 -621
  85. package/src/tools/buildTool.ts +0 -61
  86. package/src/tools/cronCreateTool.ts +0 -161
  87. package/src/tools/cronDeleteTool.ts +0 -51
  88. package/src/tools/cronListTool.ts +0 -47
  89. package/src/tools/editTool.ts +0 -313
  90. package/src/tools/enterPlanMode.ts +0 -124
  91. package/src/tools/enterWorktreeTool.ts +0 -190
  92. package/src/tools/exitPlanMode.ts +0 -139
  93. package/src/tools/exitWorktreeTool.ts +0 -236
  94. package/src/tools/globTool.ts +0 -167
  95. package/src/tools/grepTool.ts +0 -399
  96. package/src/tools/lspTool.ts +0 -883
  97. package/src/tools/readTool.ts +0 -426
  98. package/src/tools/skillTool.ts +0 -248
  99. package/src/tools/taskManagementTools.ts +0 -574
  100. package/src/tools/taskStopTool.ts +0 -78
  101. package/src/tools/types.ts +0 -137
  102. package/src/tools/webFetchTool.ts +0 -373
  103. package/src/tools/workflowTool.ts +0 -205
  104. package/src/tools/writeTool.ts +0 -267
  105. package/src/types/agent.ts +0 -128
  106. package/src/types/auth.ts +0 -19
  107. package/src/types/commands.ts +0 -30
  108. package/src/types/config.ts +0 -43
  109. package/src/types/configuration.ts +0 -168
  110. package/src/types/core.ts +0 -105
  111. package/src/types/cron.ts +0 -13
  112. package/src/types/environment.ts +0 -106
  113. package/src/types/fileSearch.ts +0 -4
  114. package/src/types/history.ts +0 -7
  115. package/src/types/hooks.ts +0 -256
  116. package/src/types/index.ts +0 -41
  117. package/src/types/lsp.ts +0 -98
  118. package/src/types/marketplace.ts +0 -71
  119. package/src/types/mcp.ts +0 -43
  120. package/src/types/memoryRule.ts +0 -31
  121. package/src/types/messaging.ts +0 -114
  122. package/src/types/permissions.ts +0 -80
  123. package/src/types/plugins.ts +0 -39
  124. package/src/types/processes.ts +0 -99
  125. package/src/types/reversion.ts +0 -29
  126. package/src/types/session.ts +0 -12
  127. package/src/types/skills.ts +0 -108
  128. package/src/types/tasks.ts +0 -13
  129. package/src/types/telemetry.ts +0 -98
  130. package/src/types/tools.ts +0 -44
  131. package/src/types/workflow.ts +0 -6
  132. package/src/utils/abortUtils.ts +0 -118
  133. package/src/utils/atomicWrite.ts +0 -61
  134. package/src/utils/bashParser.ts +0 -899
  135. package/src/utils/cacheControlUtils.ts +0 -426
  136. package/src/utils/commandArgumentParser.ts +0 -161
  137. package/src/utils/commandPathResolver.ts +0 -88
  138. package/src/utils/configPaths.ts +0 -220
  139. package/src/utils/configValidator.ts +0 -100
  140. package/src/utils/constants.ts +0 -39
  141. package/src/utils/container.ts +0 -92
  142. package/src/utils/containerSetup.ts +0 -371
  143. package/src/utils/convertMessagesForAPI.ts +0 -326
  144. package/src/utils/cronTasks.ts +0 -128
  145. package/src/utils/cronTasksLock.ts +0 -182
  146. package/src/utils/cronToHuman.ts +0 -99
  147. package/src/utils/customCommands.ts +0 -95
  148. package/src/utils/editUtils.ts +0 -20
  149. package/src/utils/fileFormat.ts +0 -40
  150. package/src/utils/fileSearch.ts +0 -151
  151. package/src/utils/fileUtils.ts +0 -223
  152. package/src/utils/gitUtils.ts +0 -315
  153. package/src/utils/globalLogger.ts +0 -128
  154. package/src/utils/groupMessagesByApiRound.ts +0 -121
  155. package/src/utils/hookMatcher.ts +0 -176
  156. package/src/utils/markdownParser.ts +0 -317
  157. package/src/utils/mcpUtils.ts +0 -138
  158. package/src/utils/messageOperations.ts +0 -659
  159. package/src/utils/modelCapabilities.ts +0 -30
  160. package/src/utils/nameGenerator.ts +0 -99
  161. package/src/utils/notificationXml.ts +0 -57
  162. package/src/utils/openaiClient.ts +0 -251
  163. package/src/utils/parseCronExpression.ts +0 -78
  164. package/src/utils/path.ts +0 -72
  165. package/src/utils/pathEncoder.ts +0 -400
  166. package/src/utils/pathSafety.ts +0 -40
  167. package/src/utils/promptHistory.ts +0 -168
  168. package/src/utils/ripgrep.ts +0 -35
  169. package/src/utils/shellResolver.ts +0 -190
  170. package/src/utils/skillParser.ts +0 -246
  171. package/src/utils/stringUtils.ts +0 -156
  172. package/src/utils/subagentParser.ts +0 -279
  173. package/src/utils/taskReminder.ts +0 -96
  174. package/src/utils/tokenCalculation.ts +0 -43
  175. package/src/utils/tokenEstimate.ts +0 -34
  176. package/src/utils/toolResultStorage.ts +0 -117
  177. package/src/utils/worktreeSession.ts +0 -26
  178. package/src/utils/worktreeUtils.ts +0 -786
  179. package/src/workflow/budgetTracker.ts +0 -34
  180. package/src/workflow/concurrencyLimiter.ts +0 -47
  181. package/src/workflow/journal.ts +0 -95
  182. package/src/workflow/progressReporter.ts +0 -141
  183. package/src/workflow/runState.ts +0 -65
  184. package/src/workflow/scriptRuntime.ts +0 -274
  185. package/src/workflow/structuredOutput.ts +0 -123
  186. package/src/workflow/types.ts +0 -101
  187. package/src/workflow/workflowApis.ts +0 -410
  188. package/vendor/ripgrep/linux-aarch64/rg +0 -0
  189. package/vendor/ripgrep/linux-x86_64/rg +0 -0
  190. package/vendor/ripgrep/macos-aarch64/rg +0 -0
  191. package/vendor/ripgrep/macos-x86_64/rg +0 -0
  192. package/vendor/ripgrep/windows-aarch64/rg.exe +0 -0
  193. package/vendor/ripgrep/windows-x86_64/rg.exe +0 -0
@@ -1,43 +0,0 @@
1
- /**
2
- * Agent and service configuration types
3
- * Dependencies: None
4
- */
5
-
6
- import OpenAI from "openai";
7
- import { PermissionMode } from "./permissions.js";
8
-
9
- export interface GatewayConfig {
10
- apiKey?: string;
11
- baseURL?: string;
12
- defaultHeaders?: Record<string, string>;
13
- fetchOptions?: OpenAI["fetchOptions"];
14
- fetch?: OpenAI["fetch"];
15
- /** Session identifier, sent as the `x-session-id` request header for backend correlation. */
16
- sessionId?: string;
17
- }
18
-
19
- export interface ModelCapabilities {
20
- /** Whether the model supports image/vision input. Default: true. */
21
- vision?: boolean;
22
- /** Whether the model supports prompt caching (ephemeral cache_control markers). Default: false. */
23
- promptCaching?: boolean;
24
- }
25
-
26
- export interface ModelConfig {
27
- model?: string;
28
- fastModel?: string;
29
- maxTokens?: number;
30
- permissionMode?: PermissionMode;
31
- capabilities?: ModelCapabilities;
32
- /** Generation params passed through to the API provider (temperature, thinking, etc.) */
33
- options?: Record<string, unknown>;
34
- /** Fast model generation params (resolved from models[fastModel].options) */
35
- fastModelOptions?: Record<string, unknown>;
36
- /**
37
- * Fast-model-only disable-thinking params passed through verbatim
38
- * (e.g. `{ thinking: { type: "disabled" } }`). Applied only in fast-model
39
- * scenarios (webFetch content processing, `model: fastModel` subagents),
40
- * never in the agent loop. `{}` clears the default.
41
- */
42
- disableThinkingOptions?: Record<string, unknown>;
43
- }
@@ -1,168 +0,0 @@
1
- /**
2
- * Configuration Management Types
3
- *
4
- * Types for centralized configuration loading and validation services.
5
- * These support the refactored configuration architecture that separates
6
- * configuration management from hook execution.
7
- */
8
-
9
- import type { HookEvent, HookEventConfig } from "./hooks.js";
10
- import type { PermissionMode } from "./permissions.js";
11
- import type { ModelConfig } from "./config.js";
12
- import type { MarketplaceSource } from "./marketplace.js";
13
- import type { TelemetryConfig } from "./telemetry.js";
14
-
15
- export type Scope = "user" | "project" | "local";
16
-
17
- export interface MarketplaceConfig {
18
- source: MarketplaceSource;
19
- autoUpdate?: boolean;
20
- }
21
-
22
- /**
23
- * Root configuration structure for all Wave Agent settings including hooks and environment variables
24
- */
25
- export interface WaveConfiguration {
26
- hooks?: Partial<Record<HookEvent, HookEventConfig[]>>;
27
- env?: Record<string, string>; // Environment variables key-value pairs
28
- /** New field for persistent permissions */
29
- permissions?: {
30
- allow?: string[];
31
- deny?: string[];
32
- permissionMode?: PermissionMode; // Default permission mode for restricted tools
33
- /**
34
- * List of directories that are considered part of the Safe Zone.
35
- * File operations within these directories can be auto-accepted.
36
- */
37
- additionalDirectories?: string[];
38
- };
39
- /** New field for scoped plugin management */
40
- enabledPlugins?: Record<string, boolean>;
41
- /** Preferred language for agent communication */
42
- language?: string;
43
- /** Whether auto-memory is enabled */
44
- autoMemoryEnabled?: boolean;
45
- /** Frequency of auto-memory extraction turns */
46
- autoMemoryFrequency?: number;
47
- /** Persisted model selection (from /model command) */
48
- model?: string;
49
- /** Model-specific configuration overrides */
50
- models?: Record<string, Partial<ModelConfig>>;
51
- /** Scoped marketplace declarations */
52
- marketplaces?: Record<string, MarketplaceConfig>;
53
- /** OpenTelemetry monitoring configuration */
54
- monitoring?: {
55
- telemetry?: Partial<TelemetryConfig>;
56
- };
57
- /** Worktree configuration */
58
- worktree?: {
59
- /** Base ref for new worktrees: "fresh" (origin/<default-branch>, default) | "head" (local HEAD) */
60
- baseRef?: "fresh" | "head";
61
- };
62
- }
63
-
64
- /**
65
- * Legacy alias for backward compatibility - will be deprecated
66
- */
67
- export interface HookConfiguration extends WaveConfiguration {
68
- hooks: Partial<Record<HookEvent, HookEventConfig[]>>;
69
- }
70
-
71
- /**
72
- * Partial hook configuration for loading/merging scenarios
73
- */
74
- export type PartialHookConfiguration = Partial<
75
- Record<HookEvent, HookEventConfig[]>
76
- >;
77
-
78
- /**
79
- * Direct hook configuration record (for test convenience)
80
- */
81
- export type HookConfigurationRecord = Record<HookEvent, HookEventConfig[]>;
82
-
83
- /**
84
- * Result of configuration loading operations with detailed status information
85
- */
86
- export interface ConfigurationLoadResult {
87
- /** The loaded configuration, or null if loading failed */
88
- configuration: WaveConfiguration | null;
89
- /** Whether the loading operation was successful */
90
- success: boolean;
91
- /** Error message if loading failed */
92
- error?: string;
93
- /** Path of the successfully loaded file */
94
- sourcePath?: string;
95
- /** Non-critical warnings during loading */
96
- warnings: string[];
97
- }
98
-
99
- /**
100
- * Result of configuration validation operations
101
- */
102
- export interface ValidationResult {
103
- /** Whether the configuration is valid */
104
- isValid: boolean;
105
- /** Critical errors that prevent configuration use */
106
- errors: string[];
107
- /** Non-critical warnings about the configuration */
108
- warnings: string[];
109
- }
110
-
111
- /**
112
- * Configuration file paths organized by category
113
- */
114
- export interface ConfigurationPaths {
115
- /** User-specific configuration file paths in priority order */
116
- userPaths: string[];
117
- /** Project-specific configuration file paths in priority order */
118
- projectPaths: string[];
119
- /** Builtin configuration file paths */
120
- builtinPaths: string[];
121
- /** All configuration paths combined */
122
- allPaths: string[];
123
- /** Only the paths that actually exist on the filesystem */
124
- existingPaths: string[];
125
- }
126
-
127
- /**
128
- * Options for configuring the ConfigurationService
129
- */
130
- export interface ConfigurationServiceOptions {
131
- /** Working directory for resolving project configurations */
132
- workdir: string;
133
- /** Optional logger for configuration operations */
134
- logger?: Logger;
135
- /** Whether to enable validation during loading (default: true) */
136
- enableValidation?: boolean;
137
- }
138
-
139
- /**
140
- * Minimal logger interface for configuration services
141
- */
142
- interface Logger {
143
- error: (...args: unknown[]) => void;
144
- warn: (...args: unknown[]) => void;
145
- info: (...args: unknown[]) => void;
146
- debug: (...args: unknown[]) => void;
147
- }
148
-
149
- export interface RemoteSettingsResponse {
150
- uuid: string;
151
- checksum: string;
152
- settings: WaveConfiguration;
153
- }
154
-
155
- export interface RemoteSettingsCache {
156
- uuid: string;
157
- checksum: string;
158
- settings: WaveConfiguration;
159
- fetchedAt: string;
160
- }
161
-
162
- export interface RemoteSettingsFetchResult {
163
- success: boolean;
164
- settings?: WaveConfiguration | null;
165
- checksum?: string;
166
- error?: string;
167
- notConfigured?: boolean;
168
- }
package/src/types/core.ts DELETED
@@ -1,105 +0,0 @@
1
- /**
2
- * Core foundational types used across multiple domains
3
- * Dependencies: None (foundation layer)
4
- */
5
-
6
- import type { CompletionUsage } from "openai/resources";
7
-
8
- /**
9
- * Logger interface definition
10
- * Compatible with OpenAI package Logger interface
11
- */
12
- export interface Logger {
13
- error: (...args: unknown[]) => void;
14
- warn: (...args: unknown[]) => void;
15
- info: (...args: unknown[]) => void;
16
- debug: (...args: unknown[]) => void;
17
- }
18
-
19
- /**
20
- * Usage statistics for AI operations
21
- * Extends OpenAI's Usage format with additional tracking fields
22
- */
23
- export interface Usage {
24
- prompt_tokens: number; // Tokens used in prompts
25
- completion_tokens: number; // Tokens generated in completions
26
- total_tokens: number; // Sum of prompt + completion tokens
27
- model?: string; // Model used for the operation (e.g., "gpt-4", "gpt-3.5-turbo")
28
- operation_type?: "agent" | "compact"; // Type of operation that generated usage
29
-
30
- // Cache-related tokens (Claude top-level + OpenAI prompt_tokens_details)
31
- cache_read_input_tokens?: number; // Tokens read from cache (Claude) or cached_tokens (OpenAI prompt_tokens_details)
32
- cache_creation_input_tokens?: number; // Tokens used to create cache entries
33
- cache_creation?: {
34
- ephemeral_5m_input_tokens: number; // Tokens cached for 5 minutes
35
- ephemeral_1h_input_tokens: number; // Tokens cached for 1 hour
36
- };
37
- }
38
-
39
- /**
40
- * Enhanced usage metrics including Claude cache information
41
- * Backward compatible with standard OpenAI CompletionUsage
42
- */
43
- export interface ClaudeUsage extends CompletionUsage {
44
- // Standard OpenAI usage fields (inherited)
45
- prompt_tokens: number;
46
- completion_tokens: number;
47
- total_tokens: number;
48
-
49
- // Claude-specific cache extensions
50
- /**
51
- * Number of tokens read from existing cache
52
- * Indicates cost savings from cache hits
53
- */
54
- cache_read_input_tokens?: number;
55
-
56
- /**
57
- * Number of tokens used to create new cache entries
58
- * Investment in future cache hits
59
- */
60
- cache_creation_input_tokens?: number;
61
-
62
- /**
63
- * Detailed breakdown of cache creation by duration
64
- */
65
- cache_creation?: {
66
- /** Tokens cached for 5 minute duration */
67
- ephemeral_5m_input_tokens: number;
68
- /** Tokens cached for 1 hour duration */
69
- ephemeral_1h_input_tokens: number;
70
- };
71
- }
72
-
73
- /**
74
- * Represents a diff change for tool parameter-based diff display
75
- * Contains the old content and new content for comparison
76
- */
77
- export interface Change {
78
- /** The original content (empty string for additions) */
79
- oldContent: string;
80
- /** The new content (empty string for deletions) */
81
- newContent: string;
82
- /** Optional starting line number in the original file */
83
- startLineNumber?: number;
84
- }
85
-
86
- export class ConfigurationError extends Error {
87
- constructor(
88
- message: string,
89
- public readonly field: string,
90
- public readonly provided?: unknown,
91
- ) {
92
- super(message);
93
- this.name = "ConfigurationError";
94
- }
95
- }
96
-
97
- // Standard error messages
98
- export const CONFIG_ERRORS = {
99
- MISSING_MODEL:
100
- "Agent configuration requires model. Provide via constructor or WAVE_MODEL environment variable.",
101
- MISSING_FAST_MODEL:
102
- "Agent configuration requires fastModel. Provide via constructor or WAVE_FAST_MODEL environment variable.",
103
- INVALID_WAVE_MAX_INPUT_TOKENS: "Token limit must be a positive integer.",
104
- EMPTY_BASE_URL: "Base URL cannot be empty string.",
105
- } as const;
package/src/types/cron.ts DELETED
@@ -1,13 +0,0 @@
1
- export interface CronJob {
2
- id: string;
3
- cron: string;
4
- prompt: string;
5
- recurring: boolean;
6
- createdAt: number;
7
- nextRun: number;
8
- periodMs: number;
9
- /** When true, the job is persisted to .wave/scheduled_tasks.json. */
10
- durable?: boolean;
11
- /** Timestamp of the last time a durable recurring job fired. */
12
- lastFiredAt?: number;
13
- }
@@ -1,106 +0,0 @@
1
- import type { Scope } from "./configuration.js";
2
-
3
- /**
4
- * Environment Variable System Types
5
- *
6
- * Provides comprehensive TypeScript types for environment variable validation,
7
- * merging, and conflict resolution in the Wave Agent SDK.
8
- */
9
-
10
- /**
11
- * Result of environment variable validation
12
- */
13
- export interface EnvironmentValidationResult {
14
- isValid: boolean;
15
- errors: string[];
16
- warnings: string[];
17
- }
18
-
19
- /**
20
- * Context containing merged environment variables and conflict information
21
- */
22
- export interface MergedEnvironmentContext {
23
- userVars: Record<string, string>;
24
- projectVars: Record<string, string>;
25
- mergedVars: Record<string, string>;
26
- conflicts: Array<{
27
- key: string;
28
- userValue: string;
29
- projectValue: string;
30
- resolvedValue: string;
31
- }>;
32
- }
33
-
34
- /**
35
- * Type guard to check if a value is a valid environment variables object
36
- */
37
- export function isValidEnvironmentVars(
38
- env: unknown,
39
- ): env is Record<string, string> {
40
- if (typeof env !== "object" || env === null) {
41
- return false;
42
- }
43
-
44
- // Check if all keys and values are strings
45
- for (const [key, value] of Object.entries(env)) {
46
- if (typeof key !== "string" || typeof value !== "string") {
47
- return false;
48
- }
49
- }
50
-
51
- return true;
52
- }
53
-
54
- /**
55
- * Configuration options for environment merging
56
- */
57
- export interface EnvironmentMergeOptions {
58
- /** Whether to include warnings for conflicting variables */
59
- includeConflictWarnings?: boolean;
60
- /** Whether to validate variable names for common patterns */
61
- validateVariableNames?: boolean;
62
- }
63
-
64
- /**
65
- * Result of environment variable processing operations
66
- */
67
- export interface EnvironmentProcessResult {
68
- /** The processed environment variables */
69
- processedVars: Record<string, string>;
70
- /** Any conflicts that occurred during processing */
71
- conflicts: EnvironmentConflict[];
72
- /** Non-critical warnings during processing */
73
- warnings: string[];
74
- /** Whether the variables were successfully applied to process.env */
75
- applied: boolean;
76
- }
77
-
78
- /**
79
- * Enhanced environment merge context with conflict details
80
- */
81
- export interface EnvironmentMergeContext {
82
- /** User-provided environment variables */
83
- userVars: Record<string, string>;
84
- /** Project-provided environment variables */
85
- projectVars: Record<string, string>;
86
- /** Final merged environment variables */
87
- mergedVars: Record<string, string>;
88
- /** Detailed conflict information */
89
- conflicts: EnvironmentConflict[];
90
- }
91
-
92
- /**
93
- * Detailed information about an environment variable conflict
94
- */
95
- export interface EnvironmentConflict {
96
- /** The environment variable key */
97
- key: string;
98
- /** Value from user configuration */
99
- userValue: string;
100
- /** Value from project configuration */
101
- projectValue: string;
102
- /** Final resolved value (which source won) */
103
- resolvedValue: string;
104
- /** Which source provided the final value */
105
- source: Scope;
106
- }
@@ -1,4 +0,0 @@
1
- export interface FileItem {
2
- path: string;
3
- type: "file" | "directory";
4
- }
@@ -1,7 +0,0 @@
1
- export interface PromptEntry {
2
- prompt: string;
3
- timestamp: number;
4
- sessionId?: string;
5
- workdir?: string;
6
- longTextMap?: Record<string, string>;
7
- }