ferix-code 0.0.2-beta.12 → 0.0.2-beta.13

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/index.d.ts CHANGED
@@ -104,6 +104,11 @@ declare class GitError extends GitError_base<{
104
104
  */
105
105
  type FerixError = LLMError | ParseError | PlanStoreError | SessionStoreError | ProgressStoreError | GuardrailsStoreError | OrchestratorError | GitError;
106
106
 
107
+ /**
108
+ * Supported LLM provider names.
109
+ */
110
+ declare const ProviderNameSchema: Schema.Literal<["claude", "cursor"]>;
111
+ type ProviderName = typeof ProviderNameSchema.Type;
107
112
  declare const PhasePromptOverridesSchema: Schema.Struct<{
108
113
  breakdown: Schema.optional<typeof Schema.String>;
109
114
  planning: Schema.optional<typeof Schema.String>;
@@ -150,6 +155,8 @@ declare const LoopConfigSchema: Schema.Struct<{
150
155
  }>>;
151
156
  additionalContext: Schema.optional<typeof Schema.String>;
152
157
  }>>;
158
+ /** LLM provider to use. Defaults to "claude". */
159
+ provider: Schema.optional<Schema.Literal<["claude", "cursor"]>>;
153
160
  }>;
154
161
  type LoopConfig = typeof LoopConfigSchema.Type;
155
162
  declare const LoopSummarySchema: Schema.Struct<{
@@ -188,6 +195,7 @@ declare const decodeLoopConfig: (u: unknown, overrideOptions?: effect_SchemaAST.
188
195
  } | undefined;
189
196
  readonly additionalContext?: string | undefined;
190
197
  } | undefined;
198
+ readonly provider?: "claude" | "cursor" | undefined;
191
199
  }, effect_ParseResult.ParseError, never>;
192
200
 
193
201
  /**
@@ -216,6 +224,7 @@ declare const LoopStartedEventSchema: Schema.TaggedStruct<"LoopStarted", {
216
224
  }>>;
217
225
  additionalContext: Schema.optional<typeof Schema.String>;
218
226
  }>>;
227
+ provider: Schema.optional<Schema.Literal<["claude", "cursor"]>>;
219
228
  }>;
220
229
  timestamp: typeof Schema.Number;
221
230
  }>;
@@ -507,6 +516,7 @@ declare const DomainEventSchema: Schema.Union<[Schema.TaggedStruct<"LoopStarted"
507
516
  }>>;
508
517
  additionalContext: Schema.optional<typeof Schema.String>;
509
518
  }>>;
519
+ provider: Schema.optional<Schema.Literal<["claude", "cursor"]>>;
510
520
  }>;
511
521
  timestamp: typeof Schema.Number;
512
522
  }>, Schema.TaggedStruct<"LoopCompleted", {
@@ -1022,6 +1032,7 @@ declare const RunOptionsDataSchema: Schema.Struct<{
1022
1032
  }>>;
1023
1033
  additionalContext: Schema.optional<typeof Schema.String>;
1024
1034
  }>>;
1035
+ provider: Schema.optional<Schema.Literal<["claude", "cursor"]>>;
1025
1036
  }>;
1026
1037
  consumer: Schema.optional<Schema.Literal<["tui", "headless", "none"]>>;
1027
1038
  }>;
@@ -2073,13 +2084,68 @@ declare const MemoryGuardrails: {
2073
2084
  readonly layer: typeof layer$3;
2074
2085
  };
2075
2086
 
2087
+ /**
2088
+ * Configuration for a provider.
2089
+ */
2090
+ interface ProviderConfig {
2091
+ /** Provider name */
2092
+ readonly name: ProviderName;
2093
+ /** CLI command to execute */
2094
+ readonly cliCommand: string;
2095
+ /** Default arguments for the CLI */
2096
+ readonly args: readonly string[];
2097
+ /** Environment variables to pass */
2098
+ readonly env?: Readonly<Record<string, string>>;
2099
+ /** Permission mode for the CLI */
2100
+ readonly permissions?: "acceptEdits" | "yolo" | "prompt";
2101
+ }
2102
+ /**
2103
+ * Provider interface that all LLM implementations must satisfy.
2104
+ *
2105
+ * This interface abstracts the execution of prompts across different
2106
+ * AI CLI tools (Claude, Cursor, etc.).
2107
+ */
2108
+ interface Provider {
2109
+ /** Provider name for identification */
2110
+ readonly name: ProviderName;
2111
+ /**
2112
+ * Execute a prompt and return a stream of events.
2113
+ *
2114
+ * @param prompt - The prompt to send to the LLM
2115
+ * @param options - Optional execution options
2116
+ * @returns Stream of LLM events
2117
+ */
2118
+ readonly execute: (prompt: string, options?: LLMExecuteOptions) => Stream.Stream<LLMEvent, LLMError>;
2119
+ }
2120
+ /**
2121
+ * Default provider configurations.
2122
+ */
2123
+ declare const PROVIDER_CONFIGS: Readonly<Record<ProviderName, ProviderConfig>>;
2124
+
2076
2125
  /**
2077
2126
  * ClaudeCLI namespace containing the Live layer.
2078
2127
  */
2079
2128
  declare const ClaudeCLI: {
2080
2129
  readonly Live: Layer.Layer<LLM, never, never>;
2130
+ readonly Provider: Provider;
2081
2131
  };
2082
2132
 
2133
+ /**
2134
+ * CursorCLI namespace containing the Live layer.
2135
+ */
2136
+ declare const CursorCLI: {
2137
+ readonly Live: Layer.Layer<LLM, never, never>;
2138
+ readonly Provider: Provider;
2139
+ };
2140
+
2141
+ /**
2142
+ * Creates a Layer for the specified provider.
2143
+ *
2144
+ * @param name - The provider name
2145
+ * @returns Layer providing the LLM service
2146
+ */
2147
+ declare function createProviderLayer(name: ProviderName): Layer.Layer<LLM>;
2148
+
2083
2149
  /**
2084
2150
  * Service interface for plan persistence.
2085
2151
  *
@@ -2454,7 +2520,7 @@ declare const FerixParser: {
2454
2520
  * Production layer bundle.
2455
2521
  *
2456
2522
  * Uses real implementations:
2457
- * - Claude CLI for LLM
2523
+ * - Claude CLI for LLM (default)
2458
2524
  * - Ferix parser for signals
2459
2525
  * - File system for plan, session, progress, guardrails, and git storage
2460
2526
  *
@@ -2471,6 +2537,26 @@ declare const FerixParser: {
2471
2537
  * ```
2472
2538
  */
2473
2539
  declare const ProductionLayers: Layer.Layer<Git | GuardrailsStore | LLM | PlanStore | ProgressStore | SessionStore | SignalParser, never, never>;
2540
+ /**
2541
+ * Creates production layers with a specific LLM provider.
2542
+ *
2543
+ * @param provider - The provider name to use (defaults to "claude")
2544
+ * @returns A layer bundle with the specified provider
2545
+ *
2546
+ * @example
2547
+ * ```typescript
2548
+ * // Use Cursor instead of Claude
2549
+ * const layers = createProductionLayers("cursor");
2550
+ *
2551
+ * Effect.runPromise(
2552
+ * program.pipe(
2553
+ * Stream.runForEach(console.log),
2554
+ * Effect.provide(layers)
2555
+ * )
2556
+ * );
2557
+ * ```
2558
+ */
2559
+ declare function createProductionLayers(provider?: ProviderName): Layer.Layer<Git | GuardrailsStore | LLM | PlanStore | ProgressStore | SessionStore | SignalParser, never, never>;
2474
2560
  /**
2475
2561
  * Test layer bundle.
2476
2562
  *
@@ -2676,4 +2762,4 @@ declare function collectEvents(config: LoopConfig, mockEvents?: readonly LLMEven
2676
2762
  */
2677
2763
  declare function main(config: LoopConfig): Promise<void>;
2678
2764
 
2679
- export { type CheckFailedEvent, CheckFailedEventSchema, type CheckFailedSignal, CheckFailedSignalSchema, type CheckPassedEvent, CheckPassedEventSchema, type CheckPassedSignal, CheckPassedSignalSchema, ClaudeCLI, type CommitHash, type ConsoleLoggerConfig, ConsoleLoggerConfigSchema, type Consumer, type ConsumerType, ConsumerTypeSchema, type CriteriaDefinedData, CriteriaDefinedDataSchema, type CriteriaDefinedEvent, CriteriaDefinedEventSchema, type CriteriaDefinedSignal, CriteriaDefinedSignalSchema, type Criterion, type CriterionBasicInfo, CriterionBasicInfoSchema, type CriterionFailedData, CriterionFailedDataSchema, type CriterionFailedEvent, CriterionFailedEventSchema, type CriterionFailedSignal, CriterionFailedSignalSchema, type CriterionIdData, CriterionIdDataSchema, type CriterionPassedEvent, CriterionPassedEventSchema, type CriterionPassedSignal, CriterionPassedSignalSchema, CriterionSchema, type CriterionStatus, CriterionStatusSchema, type DiscoveryCompletedEvent, DiscoveryCompletedEventSchema, type DiscoveryStartedEvent, DiscoveryStartedEventSchema, type DomainEvent, DomainEventSchema, DomainEventUtils, type DoneEvent, DoneEventSchema, type ExecutionMode, ExecutionModeSchema, type FerixError, FerixParser, type FileLoggerConfig, FileLoggerConfigSchema, FileSystemGit, FileSystemGuardrails, FileSystemPlan, FileSystemProgress, FileSystemSession, type GeneratedTask, type GeneratedTaskList, GeneratedTaskListSchema, GeneratedTaskSchema, type GeneratedTaskStatus, GeneratedTaskStatusSchema, Git, GitError, type GitService, type Guardrail, type GuardrailAddedEvent, GuardrailAddedEventSchema, GuardrailSchema, type GuardrailSeverity, GuardrailSeveritySchema, type GuardrailSignal, GuardrailSignalSchema, type GuardrailsFile, GuardrailsFileSchema, GuardrailsStore, GuardrailsStoreError, type GuardrailsStoreService, type IterationCompletedEvent, IterationCompletedEventSchema, type IterationStartedEvent, IterationStartedEventSchema, LLM, LLMError, type LLMEvent, LLMEventSchema, type LLMExecuteOptions, type LLMService, type LLMTextEvent, LLMTextEventSchema, type LLMToolEndEvent, LLMToolEndEventSchema, type LLMToolStartEvent, LLMToolStartEventSchema, type LLMToolUseEvent, LLMToolUseEventSchema, type LearningCategory, LearningCategorySchema, type LearningRecordedEvent, LearningRecordedEventSchema, type LearningSignal, LearningSignalSchema, type LogEntry, LogEntrySchema, type LogLevel, LogLevelSchema, type LoopCompleteSignal, LoopCompleteSignalSchema, type LoopCompletedEvent, LoopCompletedEventSchema, type LoopConfig, LoopConfigSchema, type LoopError, LoopErrorSchema, type LoopFailedEvent, LoopFailedEventSchema, type LoopStartedEvent, LoopStartedEventSchema, type LoopStatus, LoopStatusSchema, type LoopSummary, LoopSummarySchema, MemoryGit, MemoryGuardrails, MemoryPlan, MemoryProgress, MemorySession, Mock, Mock as MockLLM, OrchestratorError, type OrchestratorServices, ParseError, type Phase, type PhaseBasicInfo, PhaseBasicInfoSchema, type PhaseCompletedEvent, PhaseCompletedEventSchema, type PhaseCompletedSignal, PhaseCompletedSignalSchema, type PhaseFailedData, PhaseFailedDataSchema, type PhaseFailedEvent, PhaseFailedEventSchema, type PhaseFailedSignal, PhaseFailedSignalSchema, type PhaseIdData, PhaseIdDataSchema, type PhasePromptOverrides, PhasePromptOverridesSchema, PhaseSchema, type PhaseStartedEvent, PhaseStartedEventSchema, type PhaseStartedSignal, PhaseStartedSignalSchema, type PhaseStatus, PhaseStatusSchema, type PhasesDefinedData, PhasesDefinedDataSchema, type PhasesDefinedEvent, PhasesDefinedEventSchema, type PhasesDefinedSignal, PhasesDefinedSignalSchema, type Plan, type PlanCreatedEvent, PlanCreatedEventSchema, type PlanData, PlanDataSchema, PlanId, PlanSchema, PlanStore, PlanStoreError, type PlanStoreService, type PlanUpdateFailedEvent, PlanUpdateFailedEventSchema, type PlanUpdatedEvent, PlanUpdatedEventSchema, type PrUrl, ProductionLayers, type ProgressAction, ProgressActionSchema, type ProgressEntry, ProgressEntrySchema, type ProgressFile, ProgressFileSchema, ProgressStore, ProgressStoreError, type ProgressStoreService, type ProgressUpdatedEvent, ProgressUpdatedEventSchema, type PromptConfig, PromptConfigSchema, type ReviewCompleteData, ReviewCompleteDataSchema, type ReviewCompleteEvent, ReviewCompleteEventSchema, type ReviewCompleteSignal, ReviewCompleteSignalSchema, type RunOptions, type RunOptionsData, RunOptionsDataSchema, type Session, SessionSchema, type SessionStatus, SessionStatusSchema, SessionStore, SessionStoreError, type SessionStoreService, type Signal, type SignalAccumulator, SignalParser, type SignalParserService, SignalSchema, type TUICriterion, TUICriterionSchema, type TUICriterionStatus, TUICriterionStatusSchema, type TUIPhase, TUIPhaseSchema, type TUIPhaseStatus, TUIPhaseStatusSchema, type TUIState, TUIStateSchema, type TUITask, TUITaskSchema, type TUITaskStatus, TUITaskStatusSchema, type Task, type TaskBasicInfo, TaskBasicInfoSchema, type TaskCompleteData, TaskCompleteDataSchema, type TaskCompleteSignal, type TaskCompleteSignalData, TaskCompleteSignalDataSchema, TaskCompleteSignalSchema, type TaskCompletedEvent, TaskCompletedEventSchema, TaskSchema, type TaskStatus, TaskStatusSchema, type TasksDefinedData, TasksDefinedDataSchema, type TasksDefinedEvent, TasksDefinedEventSchema, type TasksDefinedSignal, TasksDefinedSignalSchema, TestLayers, type TextEvent, TextEventSchema, type ToolEndEvent, ToolEndEventSchema, type ToolStartEvent, ToolStartEventSchema, type ToolUseEvent, ToolUseEventSchema, type ViewMode, ViewModeSchema, type WorktreeCreatedEvent, WorktreeCreatedEventSchema, type WorktreeInfo, type WorktreePath, type WorktreeRemovedEvent, WorktreeRemovedEventSchema, buildPrompt, collectEvents, createHeadlessConsumer, createTUIConsumer, createTestLayers, decodeGuardrail, decodeGuardrailsFile, decodeLLMEvent, decodeLoopConfig, decodePlan, decodePlanData, decodeProgressEntry, decodeProgressFile, decodeSession, decodeSignal, decodeSignalSync, formatTasksMd, main, parseTasksMd, run, runLoop, runTest };
2765
+ export { type CheckFailedEvent, CheckFailedEventSchema, type CheckFailedSignal, CheckFailedSignalSchema, type CheckPassedEvent, CheckPassedEventSchema, type CheckPassedSignal, CheckPassedSignalSchema, ClaudeCLI, type CommitHash, type ConsoleLoggerConfig, ConsoleLoggerConfigSchema, type Consumer, type ConsumerType, ConsumerTypeSchema, type CriteriaDefinedData, CriteriaDefinedDataSchema, type CriteriaDefinedEvent, CriteriaDefinedEventSchema, type CriteriaDefinedSignal, CriteriaDefinedSignalSchema, type Criterion, type CriterionBasicInfo, CriterionBasicInfoSchema, type CriterionFailedData, CriterionFailedDataSchema, type CriterionFailedEvent, CriterionFailedEventSchema, type CriterionFailedSignal, CriterionFailedSignalSchema, type CriterionIdData, CriterionIdDataSchema, type CriterionPassedEvent, CriterionPassedEventSchema, type CriterionPassedSignal, CriterionPassedSignalSchema, CriterionSchema, type CriterionStatus, CriterionStatusSchema, CursorCLI, type DiscoveryCompletedEvent, DiscoveryCompletedEventSchema, type DiscoveryStartedEvent, DiscoveryStartedEventSchema, type DomainEvent, DomainEventSchema, DomainEventUtils, type DoneEvent, DoneEventSchema, type ExecutionMode, ExecutionModeSchema, type FerixError, FerixParser, type FileLoggerConfig, FileLoggerConfigSchema, FileSystemGit, FileSystemGuardrails, FileSystemPlan, FileSystemProgress, FileSystemSession, type GeneratedTask, type GeneratedTaskList, GeneratedTaskListSchema, GeneratedTaskSchema, type GeneratedTaskStatus, GeneratedTaskStatusSchema, Git, GitError, type GitService, type Guardrail, type GuardrailAddedEvent, GuardrailAddedEventSchema, GuardrailSchema, type GuardrailSeverity, GuardrailSeveritySchema, type GuardrailSignal, GuardrailSignalSchema, type GuardrailsFile, GuardrailsFileSchema, GuardrailsStore, GuardrailsStoreError, type GuardrailsStoreService, type IterationCompletedEvent, IterationCompletedEventSchema, type IterationStartedEvent, IterationStartedEventSchema, LLM, LLMError, type LLMEvent, LLMEventSchema, type LLMExecuteOptions, type LLMService, type LLMTextEvent, LLMTextEventSchema, type LLMToolEndEvent, LLMToolEndEventSchema, type LLMToolStartEvent, LLMToolStartEventSchema, type LLMToolUseEvent, LLMToolUseEventSchema, type LearningCategory, LearningCategorySchema, type LearningRecordedEvent, LearningRecordedEventSchema, type LearningSignal, LearningSignalSchema, type LogEntry, LogEntrySchema, type LogLevel, LogLevelSchema, type LoopCompleteSignal, LoopCompleteSignalSchema, type LoopCompletedEvent, LoopCompletedEventSchema, type LoopConfig, LoopConfigSchema, type LoopError, LoopErrorSchema, type LoopFailedEvent, LoopFailedEventSchema, type LoopStartedEvent, LoopStartedEventSchema, type LoopStatus, LoopStatusSchema, type LoopSummary, LoopSummarySchema, MemoryGit, MemoryGuardrails, MemoryPlan, MemoryProgress, MemorySession, Mock, Mock as MockLLM, OrchestratorError, type OrchestratorServices, PROVIDER_CONFIGS, ParseError, type Phase, type PhaseBasicInfo, PhaseBasicInfoSchema, type PhaseCompletedEvent, PhaseCompletedEventSchema, type PhaseCompletedSignal, PhaseCompletedSignalSchema, type PhaseFailedData, PhaseFailedDataSchema, type PhaseFailedEvent, PhaseFailedEventSchema, type PhaseFailedSignal, PhaseFailedSignalSchema, type PhaseIdData, PhaseIdDataSchema, type PhasePromptOverrides, PhasePromptOverridesSchema, PhaseSchema, type PhaseStartedEvent, PhaseStartedEventSchema, type PhaseStartedSignal, PhaseStartedSignalSchema, type PhaseStatus, PhaseStatusSchema, type PhasesDefinedData, PhasesDefinedDataSchema, type PhasesDefinedEvent, PhasesDefinedEventSchema, type PhasesDefinedSignal, PhasesDefinedSignalSchema, type Plan, type PlanCreatedEvent, PlanCreatedEventSchema, type PlanData, PlanDataSchema, PlanId, PlanSchema, PlanStore, PlanStoreError, type PlanStoreService, type PlanUpdateFailedEvent, PlanUpdateFailedEventSchema, type PlanUpdatedEvent, PlanUpdatedEventSchema, type PrUrl, ProductionLayers, type ProgressAction, ProgressActionSchema, type ProgressEntry, ProgressEntrySchema, type ProgressFile, ProgressFileSchema, ProgressStore, ProgressStoreError, type ProgressStoreService, type ProgressUpdatedEvent, ProgressUpdatedEventSchema, type PromptConfig, PromptConfigSchema, type Provider, type ProviderConfig, type ProviderName, ProviderNameSchema, type ReviewCompleteData, ReviewCompleteDataSchema, type ReviewCompleteEvent, ReviewCompleteEventSchema, type ReviewCompleteSignal, ReviewCompleteSignalSchema, type RunOptions, type RunOptionsData, RunOptionsDataSchema, type Session, SessionSchema, type SessionStatus, SessionStatusSchema, SessionStore, SessionStoreError, type SessionStoreService, type Signal, type SignalAccumulator, SignalParser, type SignalParserService, SignalSchema, type TUICriterion, TUICriterionSchema, type TUICriterionStatus, TUICriterionStatusSchema, type TUIPhase, TUIPhaseSchema, type TUIPhaseStatus, TUIPhaseStatusSchema, type TUIState, TUIStateSchema, type TUITask, TUITaskSchema, type TUITaskStatus, TUITaskStatusSchema, type Task, type TaskBasicInfo, TaskBasicInfoSchema, type TaskCompleteData, TaskCompleteDataSchema, type TaskCompleteSignal, type TaskCompleteSignalData, TaskCompleteSignalDataSchema, TaskCompleteSignalSchema, type TaskCompletedEvent, TaskCompletedEventSchema, TaskSchema, type TaskStatus, TaskStatusSchema, type TasksDefinedData, TasksDefinedDataSchema, type TasksDefinedEvent, TasksDefinedEventSchema, type TasksDefinedSignal, TasksDefinedSignalSchema, TestLayers, type TextEvent, TextEventSchema, type ToolEndEvent, ToolEndEventSchema, type ToolStartEvent, ToolStartEventSchema, type ToolUseEvent, ToolUseEventSchema, type ViewMode, ViewModeSchema, type WorktreeCreatedEvent, WorktreeCreatedEventSchema, type WorktreeInfo, type WorktreePath, type WorktreeRemovedEvent, WorktreeRemovedEventSchema, buildPrompt, collectEvents, createHeadlessConsumer, createProductionLayers, createProviderLayer, createTUIConsumer, createTestLayers, decodeGuardrail, decodeGuardrailsFile, decodeLLMEvent, decodeLoopConfig, decodePlan, decodePlanData, decodeProgressEntry, decodeProgressFile, decodeSession, decodeSignal, decodeSignalSync, formatTasksMd, main, parseTasksMd, run, runLoop, runTest };