reasonix 0.21.0 → 0.23.0
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/cli/index.js +1478 -912
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +37 -2
- package/dist/index.js +197 -139
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -705,12 +705,15 @@ declare function formatLoopError(err: Error): string;
|
|
|
705
705
|
/** Expand `@path` mentions inline. Paths must resolve inside rootDir; escapes / oversize get a skip note, not content. */
|
|
706
706
|
/** Caps match tool-result dispatch truncation (0.5.2). */
|
|
707
707
|
declare const DEFAULT_AT_MENTION_MAX_BYTES: number;
|
|
708
|
+
/** Universally-uninteresting build / VCS dirs. Framework-specific dirs (Pods, target, …) live in .gitignore. */
|
|
708
709
|
declare const DEFAULT_PICKER_IGNORE_DIRS: readonly string[];
|
|
709
710
|
interface ListFilesOptions {
|
|
710
|
-
/** Cap the walk once we've collected this many entries. Default
|
|
711
|
+
/** Cap the walk once we've collected this many entries. Default 2000. */
|
|
711
712
|
maxResults?: number;
|
|
712
713
|
/** Directory names to skip entirely. Defaults to {@link DEFAULT_PICKER_IGNORE_DIRS}. */
|
|
713
714
|
ignoreDirs?: readonly string[];
|
|
715
|
+
/** Walk nested .gitignores (root + every subdir). Default true. */
|
|
716
|
+
respectGitignore?: boolean;
|
|
714
717
|
}
|
|
715
718
|
/** Sync on purpose — fits the TUI's single-turn-per-tick model. Skips dot-DIRS but keeps dotfiles. */
|
|
716
719
|
declare function listFilesSync(root: string, opts?: ListFilesOptions): string[];
|
|
@@ -1637,6 +1640,19 @@ interface SlowEvent {
|
|
|
1637
1640
|
p95Ms: number;
|
|
1638
1641
|
sampleSize: number;
|
|
1639
1642
|
}
|
|
1643
|
+
interface LatencyTrackerOptions {
|
|
1644
|
+
thresholdMs?: number;
|
|
1645
|
+
onSlow?: (ev: SlowEvent) => void;
|
|
1646
|
+
}
|
|
1647
|
+
declare class LatencyTracker {
|
|
1648
|
+
private readonly serverName;
|
|
1649
|
+
private samples;
|
|
1650
|
+
private wasOverThreshold;
|
|
1651
|
+
private readonly thresholdMs;
|
|
1652
|
+
private readonly onSlow?;
|
|
1653
|
+
constructor(serverName: string, opts?: LatencyTrackerOptions);
|
|
1654
|
+
record(elapsedMs: number): void;
|
|
1655
|
+
}
|
|
1640
1656
|
|
|
1641
1657
|
interface BridgeOptions {
|
|
1642
1658
|
/** Prefix for tool names — disambiguates collisions when bridging multiple servers. */
|
|
@@ -1660,6 +1676,12 @@ interface BridgeOptions {
|
|
|
1660
1676
|
slowThresholdMs?: number;
|
|
1661
1677
|
/** Fired exactly when the per-server p95 transitions over `slowThresholdMs`. */
|
|
1662
1678
|
onSlow?: (ev: SlowEvent) => void;
|
|
1679
|
+
/** Indirection so reconnect can swap the underlying client without re-registering tools. */
|
|
1680
|
+
host?: McpClientHost;
|
|
1681
|
+
}
|
|
1682
|
+
/** Mutable holder so `/mcp reconnect` can swap the underlying client without re-bridging tools. */
|
|
1683
|
+
interface McpClientHost {
|
|
1684
|
+
client: McpClient;
|
|
1663
1685
|
}
|
|
1664
1686
|
declare const DEFAULT_MAX_RESULT_CHARS = 32000;
|
|
1665
1687
|
/** ~6% of DeepSeek V3 context. Char cap alone fails on CJK (~1 char/token). */
|
|
@@ -1674,7 +1696,18 @@ interface BridgeResult {
|
|
|
1674
1696
|
reason: string;
|
|
1675
1697
|
}>;
|
|
1676
1698
|
}
|
|
1677
|
-
|
|
1699
|
+
/** Resolved bridge environment that `registerSingleMcpTool` needs. Stored on summaries so reconnect can append new tools later. */
|
|
1700
|
+
interface BridgeEnv {
|
|
1701
|
+
registry: ToolRegistry;
|
|
1702
|
+
host: McpClientHost;
|
|
1703
|
+
prefix: string;
|
|
1704
|
+
maxResultChars: number;
|
|
1705
|
+
tracker: LatencyTracker | null;
|
|
1706
|
+
onProgress?: BridgeOptions["onProgress"];
|
|
1707
|
+
}
|
|
1708
|
+
declare function bridgeMcpTools(client: McpClient, opts?: BridgeOptions): Promise<BridgeResult & {
|
|
1709
|
+
env: BridgeEnv;
|
|
1710
|
+
}>;
|
|
1678
1711
|
interface FlattenOptions {
|
|
1679
1712
|
/** Cap the flattened string at this many characters. Default: no cap. */
|
|
1680
1713
|
maxChars?: number;
|
|
@@ -1825,6 +1858,8 @@ interface ReasonixConfig {
|
|
|
1825
1858
|
session?: string | null;
|
|
1826
1859
|
setupCompleted?: boolean;
|
|
1827
1860
|
search?: boolean;
|
|
1861
|
+
/** Persisted sidebar visibility — undefined = auto (open on cols ≥ 120). */
|
|
1862
|
+
sidebarOpen?: boolean;
|
|
1828
1863
|
projects?: {
|
|
1829
1864
|
[absoluteRootDir: string]: {
|
|
1830
1865
|
shellAllowed?: string[];
|