@ordewell/core 0.4.4 → 0.4.5
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.mts +23 -9
- package/dist/index.d.ts +23 -9
- package/dist/index.js +62 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2752,6 +2752,7 @@ interface TmuxRunnerDeps {
|
|
|
2752
2752
|
resolvePath?: () => Promise<string>;
|
|
2753
2753
|
pollIntervalMs?: number;
|
|
2754
2754
|
logDir?: string;
|
|
2755
|
+
clipboardCommand?: () => string | null;
|
|
2755
2756
|
}
|
|
2756
2757
|
declare class TmuxSession extends AbstractTerminalSession {
|
|
2757
2758
|
private tmuxSession;
|
|
@@ -2803,6 +2804,7 @@ declare class TmuxRunner extends AbstractRunner<TmuxSession> {
|
|
|
2803
2804
|
private resolvePath;
|
|
2804
2805
|
private pollIntervalMs;
|
|
2805
2806
|
private logDir;
|
|
2807
|
+
private clipboardCommand;
|
|
2806
2808
|
/** Retries get a freshly named window so a failed attempt's output stays inspectable. */
|
|
2807
2809
|
private attempts;
|
|
2808
2810
|
private ready;
|
|
@@ -2818,14 +2820,17 @@ declare class TmuxRunner extends AbstractRunner<TmuxSession> {
|
|
|
2818
2820
|
private tmux;
|
|
2819
2821
|
private createFreshSession;
|
|
2820
2822
|
/**
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
2823
|
-
*
|
|
2824
|
-
*
|
|
2825
|
-
*
|
|
2826
|
-
*
|
|
2827
|
-
*
|
|
2828
|
-
*
|
|
2823
|
+
* Gives an attached runner terminal wheel/PageUp scrolling over a deep
|
|
2824
|
+
* scrollback, and a mouse selection that reaches the system clipboard — none
|
|
2825
|
+
* of which a default tmux session does. Server-wide scoping is harmless: the
|
|
2826
|
+
* daemon owns a private socket (`tmuxSocketName`).
|
|
2827
|
+
*
|
|
2828
|
+
* `mouse on` is what costs the emulator's own drag-select, so tmux must hand
|
|
2829
|
+
* the selection back out itself: via a clipboard binary when there is one,
|
|
2830
|
+
* and via OSC 52 (`set-clipboard`) for what that cannot cover, such as
|
|
2831
|
+
* viewing over SSH. Naming the binary on the binding as well as in
|
|
2832
|
+
* `copy-command` keeps drag-to-copy working on tmux older than 3.2, which has
|
|
2833
|
+
* no `copy-command`.
|
|
2829
2834
|
*/
|
|
2830
2835
|
private configureScrolling;
|
|
2831
2836
|
/**
|
|
@@ -2970,6 +2975,15 @@ declare function tmuxWindowName(taskId: string, planSessionId?: string): string;
|
|
|
2970
2975
|
type ProbeFn = () => void;
|
|
2971
2976
|
/** Feature-detects tmux the same way `HeadlessRunner` detects `script`. */
|
|
2972
2977
|
declare function hasTmux(probe?: ProbeFn): boolean;
|
|
2978
|
+
type HasBinFn = (bin: string) => boolean;
|
|
2979
|
+
/**
|
|
2980
|
+
* Shell command tmux should pipe a copy-mode selection into, so selecting text
|
|
2981
|
+
* in a task's terminal puts it on the *system* clipboard rather than in a tmux
|
|
2982
|
+
* paste buffer no other application can read. Preferred over tmux's OSC 52
|
|
2983
|
+
* bridge, which plenty of emulators (VTE before 0.76, xterm without
|
|
2984
|
+
* `allowWindowOps`) drop on the floor.
|
|
2985
|
+
*/
|
|
2986
|
+
declare function clipboardCopyCommand(hasBin?: HasBinFn, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string | null;
|
|
2973
2987
|
|
|
2974
2988
|
declare class FsPluginStore implements IPluginStore {
|
|
2975
2989
|
getUserPluginsDir(): string;
|
|
@@ -3030,4 +3044,4 @@ declare function sanitizeSlug(raw: string): string;
|
|
|
3030
3044
|
/** Save the PRD to `<workspace>/.scratch/<slug>/PRD.md` (to-prd native convention). */
|
|
3031
3045
|
declare function savePrdMarkdown(workspace: string, slug: string, markdown: string): string;
|
|
3032
3046
|
|
|
3033
|
-
export { ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalKind, ApprovalMode, ApprovalRequest, ApprovalSource, BaseAiService, BaseConfig, BaseFileSystem, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CMD_EXE_MAX_COMMAND_LINE, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, CommandLineTooLongError, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, ConversationMessage, type ConversationRequest, type ConversationTurn, DiscoveredModel, EmbeddedNewlineError, EnvConfig, type ExecFileFn, type ExecImpl, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, GlobOptions, type GrepInvocation, GrepOptions, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, OpenAiService, OpenCodeAdapter, type OrchestratorObserver, OrchestratorOption, PROVIDER_DETECT_PRIORITY, PROVIDER_LABEL, PROVIDER_PRIORITY, PROVIDER_SHORT_LABEL, type PendingApproval, PendingApprovals, type PendingApprovalsOptions, PlanParseError, type PlanRequest, PlanState, PlanStatus, PlanStore, Planner, type PlannerReplyClassification, type PlannerRuntimeToggles, type PrdBlock, type PreparedLaunch, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchStep, ResearchToolType, type ResearchTurn, ResolveContext, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, type RunnerSpawnOptions, STATE_DIR, SYMBOL_LANGUAGES, type SerializedPlan, type SerializedTask, type SerializedTaskStatus, Session, type SessionBroadcaster, type SessionData, type SessionDeps, type SessionMessage, type SessionMeta, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SpawnSpec, StdioAgentAdapter, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, TaskOp, TaskOrchestrator, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type ToolCall, ToolOutcome, type ToolResult, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, applyHeadLimit, augmentPromptWithPriorOutputs, augmentedPath, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildShellInvocation, buildSplitPrompt, buildSubagentSystemPrompt, clampThinkingEffort, classifyCommand, classifyPlannerReply, clearAugmentedPathCache, clearResearchShellCache, clearState, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, configuredProviders, createAiService, defaultLogger, definitionPattern, deleteSession, discoverGeminiModels, effectiveAllowlist, ensureDir, executionLogBlock, executionSummary, extractPrdBlock, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isOpenAiProvider, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, referencePattern, renderPlanMap, renderPriorOutputs, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolveProviderFromPrefix, resolveResearchShell, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, serializePlan, serializeTask, serializeTaskStatus, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, tmuxSessionName, tmuxSocketName, tmuxWindowName, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };
|
|
3047
|
+
export { ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalKind, ApprovalMode, ApprovalRequest, ApprovalSource, BaseAiService, BaseConfig, BaseFileSystem, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CMD_EXE_MAX_COMMAND_LINE, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, CommandLineTooLongError, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, ConversationMessage, type ConversationRequest, type ConversationTurn, DiscoveredModel, EmbeddedNewlineError, EnvConfig, type ExecFileFn, type ExecImpl, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, OpenAiService, OpenCodeAdapter, type OrchestratorObserver, OrchestratorOption, PROVIDER_DETECT_PRIORITY, PROVIDER_LABEL, PROVIDER_PRIORITY, PROVIDER_SHORT_LABEL, type PendingApproval, PendingApprovals, type PendingApprovalsOptions, PlanParseError, type PlanRequest, PlanState, PlanStatus, PlanStore, Planner, type PlannerReplyClassification, type PlannerRuntimeToggles, type PrdBlock, type PreparedLaunch, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchStep, ResearchToolType, type ResearchTurn, ResolveContext, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, type RunnerSpawnOptions, STATE_DIR, SYMBOL_LANGUAGES, type SerializedPlan, type SerializedTask, type SerializedTaskStatus, Session, type SessionBroadcaster, type SessionData, type SessionDeps, type SessionMessage, type SessionMeta, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SpawnSpec, StdioAgentAdapter, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, TaskOp, TaskOrchestrator, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type ToolCall, ToolOutcome, type ToolResult, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, applyHeadLimit, augmentPromptWithPriorOutputs, augmentedPath, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildShellInvocation, buildSplitPrompt, buildSubagentSystemPrompt, clampThinkingEffort, classifyCommand, classifyPlannerReply, clearAugmentedPathCache, clearResearchShellCache, clearState, clipboardCopyCommand, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, configuredProviders, createAiService, defaultLogger, definitionPattern, deleteSession, discoverGeminiModels, effectiveAllowlist, ensureDir, executionLogBlock, executionSummary, extractPrdBlock, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isOpenAiProvider, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, referencePattern, renderPlanMap, renderPriorOutputs, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolveProviderFromPrefix, resolveResearchShell, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, serializePlan, serializeTask, serializeTaskStatus, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, tmuxSessionName, tmuxSocketName, tmuxWindowName, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };
|
package/dist/index.d.ts
CHANGED
|
@@ -2752,6 +2752,7 @@ interface TmuxRunnerDeps {
|
|
|
2752
2752
|
resolvePath?: () => Promise<string>;
|
|
2753
2753
|
pollIntervalMs?: number;
|
|
2754
2754
|
logDir?: string;
|
|
2755
|
+
clipboardCommand?: () => string | null;
|
|
2755
2756
|
}
|
|
2756
2757
|
declare class TmuxSession extends AbstractTerminalSession {
|
|
2757
2758
|
private tmuxSession;
|
|
@@ -2803,6 +2804,7 @@ declare class TmuxRunner extends AbstractRunner<TmuxSession> {
|
|
|
2803
2804
|
private resolvePath;
|
|
2804
2805
|
private pollIntervalMs;
|
|
2805
2806
|
private logDir;
|
|
2807
|
+
private clipboardCommand;
|
|
2806
2808
|
/** Retries get a freshly named window so a failed attempt's output stays inspectable. */
|
|
2807
2809
|
private attempts;
|
|
2808
2810
|
private ready;
|
|
@@ -2818,14 +2820,17 @@ declare class TmuxRunner extends AbstractRunner<TmuxSession> {
|
|
|
2818
2820
|
private tmux;
|
|
2819
2821
|
private createFreshSession;
|
|
2820
2822
|
/**
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
2823
|
-
*
|
|
2824
|
-
*
|
|
2825
|
-
*
|
|
2826
|
-
*
|
|
2827
|
-
*
|
|
2828
|
-
*
|
|
2823
|
+
* Gives an attached runner terminal wheel/PageUp scrolling over a deep
|
|
2824
|
+
* scrollback, and a mouse selection that reaches the system clipboard — none
|
|
2825
|
+
* of which a default tmux session does. Server-wide scoping is harmless: the
|
|
2826
|
+
* daemon owns a private socket (`tmuxSocketName`).
|
|
2827
|
+
*
|
|
2828
|
+
* `mouse on` is what costs the emulator's own drag-select, so tmux must hand
|
|
2829
|
+
* the selection back out itself: via a clipboard binary when there is one,
|
|
2830
|
+
* and via OSC 52 (`set-clipboard`) for what that cannot cover, such as
|
|
2831
|
+
* viewing over SSH. Naming the binary on the binding as well as in
|
|
2832
|
+
* `copy-command` keeps drag-to-copy working on tmux older than 3.2, which has
|
|
2833
|
+
* no `copy-command`.
|
|
2829
2834
|
*/
|
|
2830
2835
|
private configureScrolling;
|
|
2831
2836
|
/**
|
|
@@ -2970,6 +2975,15 @@ declare function tmuxWindowName(taskId: string, planSessionId?: string): string;
|
|
|
2970
2975
|
type ProbeFn = () => void;
|
|
2971
2976
|
/** Feature-detects tmux the same way `HeadlessRunner` detects `script`. */
|
|
2972
2977
|
declare function hasTmux(probe?: ProbeFn): boolean;
|
|
2978
|
+
type HasBinFn = (bin: string) => boolean;
|
|
2979
|
+
/**
|
|
2980
|
+
* Shell command tmux should pipe a copy-mode selection into, so selecting text
|
|
2981
|
+
* in a task's terminal puts it on the *system* clipboard rather than in a tmux
|
|
2982
|
+
* paste buffer no other application can read. Preferred over tmux's OSC 52
|
|
2983
|
+
* bridge, which plenty of emulators (VTE before 0.76, xterm without
|
|
2984
|
+
* `allowWindowOps`) drop on the floor.
|
|
2985
|
+
*/
|
|
2986
|
+
declare function clipboardCopyCommand(hasBin?: HasBinFn, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string | null;
|
|
2973
2987
|
|
|
2974
2988
|
declare class FsPluginStore implements IPluginStore {
|
|
2975
2989
|
getUserPluginsDir(): string;
|
|
@@ -3030,4 +3044,4 @@ declare function sanitizeSlug(raw: string): string;
|
|
|
3030
3044
|
/** Save the PRD to `<workspace>/.scratch/<slug>/PRD.md` (to-prd native convention). */
|
|
3031
3045
|
declare function savePrdMarkdown(workspace: string, slug: string, markdown: string): string;
|
|
3032
3046
|
|
|
3033
|
-
export { ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalKind, ApprovalMode, ApprovalRequest, ApprovalSource, BaseAiService, BaseConfig, BaseFileSystem, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CMD_EXE_MAX_COMMAND_LINE, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, CommandLineTooLongError, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, ConversationMessage, type ConversationRequest, type ConversationTurn, DiscoveredModel, EmbeddedNewlineError, EnvConfig, type ExecFileFn, type ExecImpl, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, GlobOptions, type GrepInvocation, GrepOptions, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, OpenAiService, OpenCodeAdapter, type OrchestratorObserver, OrchestratorOption, PROVIDER_DETECT_PRIORITY, PROVIDER_LABEL, PROVIDER_PRIORITY, PROVIDER_SHORT_LABEL, type PendingApproval, PendingApprovals, type PendingApprovalsOptions, PlanParseError, type PlanRequest, PlanState, PlanStatus, PlanStore, Planner, type PlannerReplyClassification, type PlannerRuntimeToggles, type PrdBlock, type PreparedLaunch, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchStep, ResearchToolType, type ResearchTurn, ResolveContext, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, type RunnerSpawnOptions, STATE_DIR, SYMBOL_LANGUAGES, type SerializedPlan, type SerializedTask, type SerializedTaskStatus, Session, type SessionBroadcaster, type SessionData, type SessionDeps, type SessionMessage, type SessionMeta, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SpawnSpec, StdioAgentAdapter, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, TaskOp, TaskOrchestrator, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type ToolCall, ToolOutcome, type ToolResult, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, applyHeadLimit, augmentPromptWithPriorOutputs, augmentedPath, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildShellInvocation, buildSplitPrompt, buildSubagentSystemPrompt, clampThinkingEffort, classifyCommand, classifyPlannerReply, clearAugmentedPathCache, clearResearchShellCache, clearState, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, configuredProviders, createAiService, defaultLogger, definitionPattern, deleteSession, discoverGeminiModels, effectiveAllowlist, ensureDir, executionLogBlock, executionSummary, extractPrdBlock, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isOpenAiProvider, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, referencePattern, renderPlanMap, renderPriorOutputs, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolveProviderFromPrefix, resolveResearchShell, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, serializePlan, serializeTask, serializeTaskStatus, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, tmuxSessionName, tmuxSocketName, tmuxWindowName, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };
|
|
3047
|
+
export { ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalKind, ApprovalMode, ApprovalRequest, ApprovalSource, BaseAiService, BaseConfig, BaseFileSystem, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CMD_EXE_MAX_COMMAND_LINE, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, CommandLineTooLongError, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, ConversationMessage, type ConversationRequest, type ConversationTurn, DiscoveredModel, EmbeddedNewlineError, EnvConfig, type ExecFileFn, type ExecImpl, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, OpenAiService, OpenCodeAdapter, type OrchestratorObserver, OrchestratorOption, PROVIDER_DETECT_PRIORITY, PROVIDER_LABEL, PROVIDER_PRIORITY, PROVIDER_SHORT_LABEL, type PendingApproval, PendingApprovals, type PendingApprovalsOptions, PlanParseError, type PlanRequest, PlanState, PlanStatus, PlanStore, Planner, type PlannerReplyClassification, type PlannerRuntimeToggles, type PrdBlock, type PreparedLaunch, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchStep, ResearchToolType, type ResearchTurn, ResolveContext, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, type RunnerSpawnOptions, STATE_DIR, SYMBOL_LANGUAGES, type SerializedPlan, type SerializedTask, type SerializedTaskStatus, Session, type SessionBroadcaster, type SessionData, type SessionDeps, type SessionMessage, type SessionMeta, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SpawnSpec, StdioAgentAdapter, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, TaskOp, TaskOrchestrator, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type ToolCall, ToolOutcome, type ToolResult, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, applyHeadLimit, augmentPromptWithPriorOutputs, augmentedPath, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildShellInvocation, buildSplitPrompt, buildSubagentSystemPrompt, clampThinkingEffort, classifyCommand, classifyPlannerReply, clearAugmentedPathCache, clearResearchShellCache, clearState, clipboardCopyCommand, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, configuredProviders, createAiService, defaultLogger, definitionPattern, deleteSession, discoverGeminiModels, effectiveAllowlist, ensureDir, executionLogBlock, executionSummary, extractPrdBlock, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isOpenAiProvider, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, referencePattern, renderPlanMap, renderPriorOutputs, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolveProviderFromPrefix, resolveResearchShell, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, serializePlan, serializeTask, serializeTaskStatus, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, tmuxSessionName, tmuxSocketName, tmuxWindowName, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };
|
package/dist/index.js
CHANGED
|
@@ -124,6 +124,7 @@ __export(index_exports, {
|
|
|
124
124
|
clearAugmentedPathCache: () => clearAugmentedPathCache,
|
|
125
125
|
clearResearchShellCache: () => clearResearchShellCache,
|
|
126
126
|
clearState: () => clearState,
|
|
127
|
+
clipboardCopyCommand: () => clipboardCopyCommand,
|
|
127
128
|
coerceAssignments: () => coerceAssignments,
|
|
128
129
|
collectDirectDependencyOutputs: () => collectDirectDependencyOutputs,
|
|
129
130
|
collectProviderCredentials: () => collectProviderCredentials,
|
|
@@ -11809,6 +11810,28 @@ function hasTmux(probe = defaultProbe) {
|
|
|
11809
11810
|
return false;
|
|
11810
11811
|
}
|
|
11811
11812
|
}
|
|
11813
|
+
var defaultHasBin = (bin) => {
|
|
11814
|
+
try {
|
|
11815
|
+
(0, import_child_process7.execSync)(`${process.platform === "win32" ? "where" : "which"} ${bin}`, { stdio: "ignore" });
|
|
11816
|
+
return true;
|
|
11817
|
+
} catch {
|
|
11818
|
+
return false;
|
|
11819
|
+
}
|
|
11820
|
+
};
|
|
11821
|
+
function clipboardCopyCommand(hasBin = defaultHasBin, platform = process.platform, env = process.env) {
|
|
11822
|
+
const candidates = platform === "darwin" ? [["pbcopy", "pbcopy"]] : platform === "win32" ? [["clip.exe", "clip.exe"]] : [
|
|
11823
|
+
// Only prefer wl-copy when there is a Wayland display to talk to —
|
|
11824
|
+
// on X11 it is often installed but fails at copy time.
|
|
11825
|
+
...env.WAYLAND_DISPLAY ? [["wl-copy", "wl-copy"]] : [],
|
|
11826
|
+
["xclip", "xclip -selection clipboard"],
|
|
11827
|
+
["xsel", "xsel --clipboard --input"],
|
|
11828
|
+
["wl-copy", "wl-copy"]
|
|
11829
|
+
];
|
|
11830
|
+
for (const [bin, command] of candidates) {
|
|
11831
|
+
if (hasBin(bin)) return command;
|
|
11832
|
+
}
|
|
11833
|
+
return null;
|
|
11834
|
+
}
|
|
11812
11835
|
|
|
11813
11836
|
// src/services/TmuxRunner.ts
|
|
11814
11837
|
var EXIT_RE = /<<<ORDEWELL_TMUX_EXIT:(\d+)>>>/;
|
|
@@ -11918,6 +11941,7 @@ var TmuxRunner = class extends AbstractRunner {
|
|
|
11918
11941
|
resolvePath;
|
|
11919
11942
|
pollIntervalMs;
|
|
11920
11943
|
logDir;
|
|
11944
|
+
clipboardCommand;
|
|
11921
11945
|
/** Retries get a freshly named window so a failed attempt's output stays inspectable. */
|
|
11922
11946
|
attempts = /* @__PURE__ */ new Map();
|
|
11923
11947
|
ready = null;
|
|
@@ -11929,6 +11953,7 @@ var TmuxRunner = class extends AbstractRunner {
|
|
|
11929
11953
|
this.resolvePath = deps.resolvePath ?? augmentedPath;
|
|
11930
11954
|
this.pollIntervalMs = deps.pollIntervalMs ?? 500;
|
|
11931
11955
|
this.logDir = deps.logDir ?? (0, import_os.tmpdir)();
|
|
11956
|
+
this.clipboardCommand = deps.clipboardCommand ?? (() => clipboardCopyCommand());
|
|
11932
11957
|
}
|
|
11933
11958
|
/**
|
|
11934
11959
|
* Reaps a session orphaned by a crashed prior daemon on the same port, then
|
|
@@ -11957,25 +11982,44 @@ var TmuxRunner = class extends AbstractRunner {
|
|
|
11957
11982
|
await this.configureScrolling();
|
|
11958
11983
|
}
|
|
11959
11984
|
/**
|
|
11960
|
-
*
|
|
11961
|
-
*
|
|
11962
|
-
*
|
|
11963
|
-
*
|
|
11964
|
-
*
|
|
11965
|
-
*
|
|
11966
|
-
*
|
|
11967
|
-
*
|
|
11985
|
+
* Gives an attached runner terminal wheel/PageUp scrolling over a deep
|
|
11986
|
+
* scrollback, and a mouse selection that reaches the system clipboard — none
|
|
11987
|
+
* of which a default tmux session does. Server-wide scoping is harmless: the
|
|
11988
|
+
* daemon owns a private socket (`tmuxSocketName`).
|
|
11989
|
+
*
|
|
11990
|
+
* `mouse on` is what costs the emulator's own drag-select, so tmux must hand
|
|
11991
|
+
* the selection back out itself: via a clipboard binary when there is one,
|
|
11992
|
+
* and via OSC 52 (`set-clipboard`) for what that cannot cover, such as
|
|
11993
|
+
* viewing over SSH. Naming the binary on the binding as well as in
|
|
11994
|
+
* `copy-command` keeps drag-to-copy working on tmux older than 3.2, which has
|
|
11995
|
+
* no `copy-command`.
|
|
11968
11996
|
*/
|
|
11969
11997
|
async configureScrolling() {
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11998
|
+
const clip = this.clipboardCommand();
|
|
11999
|
+
const copySelection = clip ? ["copy-pipe-and-cancel", clip] : ["copy-pipe-and-cancel"];
|
|
12000
|
+
const commands = [
|
|
12001
|
+
// `history-limit` only governs windows created after it is set, so it
|
|
12002
|
+
// must run before any `new-window` — once, here at session creation.
|
|
12003
|
+
["set-option", "-g", "history-limit", "100000"],
|
|
12004
|
+
["set-option", "-g", "mouse", "on"],
|
|
12005
|
+
["set-option", "-g", "set-clipboard", "on"],
|
|
12006
|
+
...clip ? [["set-option", "-g", "copy-command", clip]] : [],
|
|
12007
|
+
["bind-key", "-T", "copy-mode", "MouseDragEnd1Pane", "send-keys", "-X", ...copySelection],
|
|
12008
|
+
["bind-key", "-T", "copy-mode-vi", "MouseDragEnd1Pane", "send-keys", "-X", ...copySelection],
|
|
12009
|
+
// Root-table PageUp; otherwise the key goes to the inner app and never
|
|
12010
|
+
// reaches tmux's scrollback. Both mode tables, so `mode-keys` can't
|
|
12011
|
+
// decide whether paging works.
|
|
12012
|
+
["bind-key", "-n", "PageUp", "copy-mode", "-u"],
|
|
12013
|
+
["bind-key", "-T", "copy-mode", "PageUp", "send-keys", "-X", "page-up"],
|
|
12014
|
+
["bind-key", "-T", "copy-mode", "PageDown", "send-keys", "-X", "page-down"],
|
|
12015
|
+
["bind-key", "-T", "copy-mode-vi", "PageUp", "send-keys", "-X", "page-up"],
|
|
12016
|
+
["bind-key", "-T", "copy-mode-vi", "PageDown", "send-keys", "-X", "page-down"]
|
|
12017
|
+
];
|
|
12018
|
+
for (const args of commands) {
|
|
12019
|
+
try {
|
|
12020
|
+
await this.tmux(args);
|
|
12021
|
+
} catch {
|
|
12022
|
+
}
|
|
11979
12023
|
}
|
|
11980
12024
|
}
|
|
11981
12025
|
/**
|
|
@@ -12901,6 +12945,7 @@ var SettingsService = class {
|
|
|
12901
12945
|
clearAugmentedPathCache,
|
|
12902
12946
|
clearResearchShellCache,
|
|
12903
12947
|
clearState,
|
|
12948
|
+
clipboardCopyCommand,
|
|
12904
12949
|
coerceAssignments,
|
|
12905
12950
|
collectDirectDependencyOutputs,
|
|
12906
12951
|
collectProviderCredentials,
|