reasonix 0.47.0 → 0.47.1
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/{acp-QK3DMC53.js → acp-GEOAKSTU.js} +21 -49
- package/dist/cli/acp-GEOAKSTU.js.map +1 -0
- package/dist/cli/{chat-VV5UWY4V.js → chat-YTPATMMG.js} +23 -23
- package/dist/cli/{chunk-FDKOUJKZ.js → chunk-2XY77LW7.js} +7 -7
- package/dist/cli/{chunk-QVDWH2A2.js → chunk-4MFCAZ2W.js} +3 -3
- package/dist/cli/{chunk-24A7FHGJ.js → chunk-6CRPCJAU.js} +14 -1
- package/dist/cli/chunk-6CRPCJAU.js.map +1 -0
- package/dist/cli/{chunk-VKYSZKH2.js → chunk-6QC5RQLE.js} +2 -2
- package/dist/cli/chunk-BQ6HC66J.js +530 -0
- package/dist/cli/chunk-BQ6HC66J.js.map +1 -0
- package/dist/cli/{chunk-OJVITDGB.js → chunk-CCJAP7G3.js} +2 -2
- package/dist/cli/{chunk-R6GQKKBW.js → chunk-CNG32VAB.js} +2 -2
- package/dist/cli/{chunk-QVUFWDD2.js → chunk-DN4B5S6Y.js} +2 -2
- package/dist/cli/{chunk-LBLR4CUZ.js → chunk-DQ6K5ZQ7.js} +2 -2
- package/dist/cli/{chunk-VNQGCA3Q.js → chunk-DWPAKZTY.js} +14 -3
- package/dist/cli/chunk-DWPAKZTY.js.map +1 -0
- package/dist/cli/{chunk-BWYVFFKR.js → chunk-GH7DC2Y5.js} +2 -2
- package/dist/cli/{chunk-BYYVYJDX.js → chunk-HUILPCYX.js} +3 -3
- package/dist/cli/{chunk-ICAFSZHS.js → chunk-JBH5RM7X.js} +174 -65
- package/dist/cli/chunk-JBH5RM7X.js.map +1 -0
- package/dist/cli/{chunk-K6GUKSXH.js → chunk-KVZZ5U75.js} +2 -2
- package/dist/cli/{chunk-WF7TPVZM.js → chunk-KYQVQ5X4.js} +84 -9
- package/dist/cli/chunk-KYQVQ5X4.js.map +1 -0
- package/dist/cli/{chunk-KDRUEXII.js → chunk-NRQ5UP5T.js} +20 -6
- package/dist/cli/chunk-NRQ5UP5T.js.map +1 -0
- package/dist/cli/{chunk-VJMBISEI.js → chunk-QCFLPSPH.js} +2 -2
- package/dist/cli/{chunk-YDPLF7XR.js → chunk-T5A7EY6B.js} +2 -2
- package/dist/cli/{chunk-VMUUFWFF.js → chunk-TDHXB2ER.js} +2 -2
- package/dist/cli/{chunk-GDKB2PPK.js → chunk-TRSAHHCL.js} +107 -11
- package/dist/cli/chunk-TRSAHHCL.js.map +1 -0
- package/dist/cli/{chunk-6J6BSUCR.js → chunk-TRWHTFG7.js} +2 -2
- package/dist/cli/{chunk-VC2CQA5D.js → chunk-XD6P7AFH.js} +26 -29
- package/dist/cli/chunk-XD6P7AFH.js.map +1 -0
- package/dist/cli/{chunk-ICSYGIPN.js → chunk-XMHP7BEE.js} +421 -80
- package/dist/cli/chunk-XMHP7BEE.js.map +1 -0
- package/dist/cli/{chunk-COWPEX54.js → chunk-YFP3MYMY.js} +5 -5
- package/dist/cli/{chunk-CI2PF5QX.js → chunk-ZXSCAODE.js} +8 -8
- package/dist/cli/{chunk-CI2PF5QX.js.map → chunk-ZXSCAODE.js.map} +1 -1
- package/dist/cli/{code-C24TUAE5.js → code-Q4NRVEDG.js} +29 -27
- package/dist/cli/code-Q4NRVEDG.js.map +1 -0
- package/dist/cli/{commands-RR3GIYOK.js → commands-4CDI4GFM.js} +4 -4
- package/dist/cli/{commit-FSHPIINM.js → commit-GW7LDQP5.js} +3 -3
- package/dist/cli/{desktop-7NCHPEFB.js → desktop-EG6P5SF2.js} +80 -22
- package/dist/cli/desktop-EG6P5SF2.js.map +1 -0
- package/dist/cli/{diff-RAAHHLHV.js → diff-VI2YX4FN.js} +8 -8
- package/dist/cli/{doctor-PKVQIXRT.js → doctor-CQTTZP27.js} +8 -8
- package/dist/cli/index.js +45 -37
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-CRJ26PP4.js → mcp-J2UCD4RZ.js} +2 -2
- package/dist/cli/{mcp-browse-QPAOWZOP.js → mcp-browse-GSX34JEK.js} +2 -2
- package/dist/cli/{mcp-inspect-CVCLABRS.js → mcp-inspect-RRFYF4ZV.js} +2 -2
- package/dist/cli/{prompt-SKYXERSI.js → prompt-5TQPIVHV.js} +3 -3
- package/dist/cli/{replay-KPDW2ZMJ.js → replay-MJCEMODU.js} +8 -8
- package/dist/cli/{run-WIKDIXTG.js → run-P4D5VDYE.js} +13 -13
- package/dist/cli/{server-P6V2G3P6.js → server-C25JNNZV.js} +11 -11
- package/dist/cli/{sessions-2NULRMSA.js → sessions-QIONZJQ6.js} +12 -12
- package/dist/cli/{setup-Y5WDBQFL.js → setup-NLQ6G5G4.js} +6 -6
- package/dist/cli/setup-NLQ6G5G4.js.map +1 -0
- package/dist/cli/{stats-T7BL2YOR.js → stats-DFZEXHP4.js} +6 -6
- package/dist/cli/{version-3KWDNWLN.js → version-GR3X3MPI.js} +12 -12
- package/dist/index.d.ts +40 -48
- package/dist/index.js +286 -237
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/cli/acp-QK3DMC53.js.map +0 -1
- package/dist/cli/chunk-24A7FHGJ.js.map +0 -1
- package/dist/cli/chunk-GDKB2PPK.js.map +0 -1
- package/dist/cli/chunk-ICAFSZHS.js.map +0 -1
- package/dist/cli/chunk-ICSYGIPN.js.map +0 -1
- package/dist/cli/chunk-KDRUEXII.js.map +0 -1
- package/dist/cli/chunk-UDVFBEXC.js +0 -642
- package/dist/cli/chunk-UDVFBEXC.js.map +0 -1
- package/dist/cli/chunk-VC2CQA5D.js.map +0 -1
- package/dist/cli/chunk-VNQGCA3Q.js.map +0 -1
- package/dist/cli/chunk-WF7TPVZM.js.map +0 -1
- package/dist/cli/code-C24TUAE5.js.map +0 -1
- package/dist/cli/desktop-7NCHPEFB.js.map +0 -1
- package/dist/cli/setup-Y5WDBQFL.js.map +0 -1
- /package/dist/cli/{chat-VV5UWY4V.js.map → chat-YTPATMMG.js.map} +0 -0
- /package/dist/cli/{chunk-FDKOUJKZ.js.map → chunk-2XY77LW7.js.map} +0 -0
- /package/dist/cli/{chunk-QVDWH2A2.js.map → chunk-4MFCAZ2W.js.map} +0 -0
- /package/dist/cli/{chunk-VKYSZKH2.js.map → chunk-6QC5RQLE.js.map} +0 -0
- /package/dist/cli/{chunk-OJVITDGB.js.map → chunk-CCJAP7G3.js.map} +0 -0
- /package/dist/cli/{chunk-R6GQKKBW.js.map → chunk-CNG32VAB.js.map} +0 -0
- /package/dist/cli/{chunk-QVUFWDD2.js.map → chunk-DN4B5S6Y.js.map} +0 -0
- /package/dist/cli/{chunk-LBLR4CUZ.js.map → chunk-DQ6K5ZQ7.js.map} +0 -0
- /package/dist/cli/{chunk-BWYVFFKR.js.map → chunk-GH7DC2Y5.js.map} +0 -0
- /package/dist/cli/{chunk-BYYVYJDX.js.map → chunk-HUILPCYX.js.map} +0 -0
- /package/dist/cli/{chunk-K6GUKSXH.js.map → chunk-KVZZ5U75.js.map} +0 -0
- /package/dist/cli/{chunk-VJMBISEI.js.map → chunk-QCFLPSPH.js.map} +0 -0
- /package/dist/cli/{chunk-YDPLF7XR.js.map → chunk-T5A7EY6B.js.map} +0 -0
- /package/dist/cli/{chunk-VMUUFWFF.js.map → chunk-TDHXB2ER.js.map} +0 -0
- /package/dist/cli/{chunk-6J6BSUCR.js.map → chunk-TRWHTFG7.js.map} +0 -0
- /package/dist/cli/{chunk-COWPEX54.js.map → chunk-YFP3MYMY.js.map} +0 -0
- /package/dist/cli/{commands-RR3GIYOK.js.map → commands-4CDI4GFM.js.map} +0 -0
- /package/dist/cli/{commit-FSHPIINM.js.map → commit-GW7LDQP5.js.map} +0 -0
- /package/dist/cli/{diff-RAAHHLHV.js.map → diff-VI2YX4FN.js.map} +0 -0
- /package/dist/cli/{doctor-PKVQIXRT.js.map → doctor-CQTTZP27.js.map} +0 -0
- /package/dist/cli/{mcp-CRJ26PP4.js.map → mcp-J2UCD4RZ.js.map} +0 -0
- /package/dist/cli/{mcp-browse-QPAOWZOP.js.map → mcp-browse-GSX34JEK.js.map} +0 -0
- /package/dist/cli/{mcp-inspect-CVCLABRS.js.map → mcp-inspect-RRFYF4ZV.js.map} +0 -0
- /package/dist/cli/{prompt-SKYXERSI.js.map → prompt-5TQPIVHV.js.map} +0 -0
- /package/dist/cli/{replay-KPDW2ZMJ.js.map → replay-MJCEMODU.js.map} +0 -0
- /package/dist/cli/{run-WIKDIXTG.js.map → run-P4D5VDYE.js.map} +0 -0
- /package/dist/cli/{server-P6V2G3P6.js.map → server-C25JNNZV.js.map} +0 -0
- /package/dist/cli/{sessions-2NULRMSA.js.map → sessions-QIONZJQ6.js.map} +0 -0
- /package/dist/cli/{stats-T7BL2YOR.js.map → stats-DFZEXHP4.js.map} +0 -0
- /package/dist/cli/{version-3KWDNWLN.js.map → version-GR3X3MPI.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfirmationChoice, PlanVerdict, CheckpointVerdict, RevisionVerdict, ChoiceVerdict } from '@reasonix/core-utils';
|
|
1
2
|
import { SpawnOptions } from 'node:child_process';
|
|
2
3
|
import { WriteStream } from 'node:fs';
|
|
3
4
|
|
|
@@ -153,6 +154,10 @@ declare class DeepSeekClient {
|
|
|
153
154
|
constructor(opts?: DeepSeekClientOptions);
|
|
154
155
|
private waitForChatRateLimit;
|
|
155
156
|
private buildPayload;
|
|
157
|
+
/** Azure OpenAI-compatible endpoints do not accept DeepSeek's proprietary
|
|
158
|
+
* `extra_body.thinking` field (they reject the request with 400). We still
|
|
159
|
+
* send `reasoning_effort`, which Azure *does* support. */
|
|
160
|
+
private _isAzureEndpoint;
|
|
156
161
|
/** Returns null on failure so callers can degrade — session must keep working without balance UI. */
|
|
157
162
|
getBalance(opts?: {
|
|
158
163
|
signal?: AbortSignal;
|
|
@@ -166,49 +171,7 @@ declare class DeepSeekClient {
|
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
/** Generic pause gate — bridges tool functions and the App's modals via Promises. */
|
|
169
|
-
|
|
170
|
-
type: "deny";
|
|
171
|
-
denyContext?: string;
|
|
172
|
-
} | {
|
|
173
|
-
type: "run_once";
|
|
174
|
-
} | {
|
|
175
|
-
type: "always_allow";
|
|
176
|
-
prefix: string;
|
|
177
|
-
};
|
|
178
|
-
type PlanVerdict = {
|
|
179
|
-
type: "approve";
|
|
180
|
-
feedback?: string;
|
|
181
|
-
} | {
|
|
182
|
-
type: "refine";
|
|
183
|
-
feedback?: string;
|
|
184
|
-
} | {
|
|
185
|
-
type: "cancel";
|
|
186
|
-
feedback?: string;
|
|
187
|
-
};
|
|
188
|
-
type CheckpointVerdict = {
|
|
189
|
-
type: "continue";
|
|
190
|
-
} | {
|
|
191
|
-
type: "revise";
|
|
192
|
-
feedback?: string;
|
|
193
|
-
} | {
|
|
194
|
-
type: "stop";
|
|
195
|
-
};
|
|
196
|
-
type RevisionVerdict = {
|
|
197
|
-
type: "accepted";
|
|
198
|
-
} | {
|
|
199
|
-
type: "rejected";
|
|
200
|
-
} | {
|
|
201
|
-
type: "cancelled";
|
|
202
|
-
};
|
|
203
|
-
type ChoiceVerdict = {
|
|
204
|
-
type: "pick";
|
|
205
|
-
optionId: string;
|
|
206
|
-
} | {
|
|
207
|
-
type: "text";
|
|
208
|
-
text: string;
|
|
209
|
-
} | {
|
|
210
|
-
type: "cancel";
|
|
211
|
-
};
|
|
174
|
+
|
|
212
175
|
type ToolConfirmationAuditEvent = {
|
|
213
176
|
type: "tool.confirm.allow";
|
|
214
177
|
kind: "run_command" | "run_background";
|
|
@@ -722,10 +685,13 @@ declare class ToolRegistry {
|
|
|
722
685
|
private readonly _autoFlatten;
|
|
723
686
|
private _planMode;
|
|
724
687
|
private _interceptor;
|
|
688
|
+
private readonly _interceptors;
|
|
725
689
|
private _auditListener;
|
|
726
690
|
private _resultAugmenter;
|
|
727
691
|
/** Per-tool fingerprint of the last call that failed schema validation. Cleared by any successful validation for that tool. */
|
|
728
692
|
private readonly _lastMalformed;
|
|
693
|
+
/** Per-tool fingerprint of the last host-side interceptor rejection. */
|
|
694
|
+
private readonly _lastInterceptorRejection;
|
|
729
695
|
constructor(opts?: ToolRegistryOptions);
|
|
730
696
|
/** Enable / disable plan-mode enforcement at dispatch. */
|
|
731
697
|
setPlanMode(on: boolean): void;
|
|
@@ -733,6 +699,8 @@ declare class ToolRegistry {
|
|
|
733
699
|
get planMode(): boolean;
|
|
734
700
|
/** At most one interceptor active; calling twice replaces. */
|
|
735
701
|
setToolInterceptor(fn: ToolInterceptor | null): void;
|
|
702
|
+
/** Ordered host-side interceptors. They run before the legacy single interceptor. */
|
|
703
|
+
addToolInterceptor(id: string, fn: ToolInterceptor): () => void;
|
|
736
704
|
setAuditListener(fn: ToolCallAuditListener | null): void;
|
|
737
705
|
/** Final-stage post-processor; replaces previous augmenter when called twice. Pass null to clear. */
|
|
738
706
|
setResultAugmenter(fn: ToolResultAugmenter | null): void;
|
|
@@ -756,8 +724,10 @@ declare class ToolRegistry {
|
|
|
756
724
|
/** Inject a mock PauseGate for tests. */
|
|
757
725
|
confirmationGate?: PauseGate;
|
|
758
726
|
}): Promise<string>;
|
|
727
|
+
private _augmentResult;
|
|
759
728
|
/** Records the failed call's fingerprint; on the 2nd consecutive identical malformed call to the same tool, returns a sharper error that tells the model to stop retrying. */
|
|
760
729
|
private _noteMalformed;
|
|
730
|
+
private _noteInterceptorRejection;
|
|
761
731
|
}
|
|
762
732
|
|
|
763
733
|
interface CacheFirstLoopOptions {
|
|
@@ -1089,6 +1059,7 @@ type PresetName = "auto" | "flash" | "pro" | "fast" | "smart" | "max";
|
|
|
1089
1059
|
/** Single trust dial: review queues edits + gates shell; auto applies + gates shell; yolo skips both gates. */
|
|
1090
1060
|
type EditMode = "review" | "auto" | "yolo";
|
|
1091
1061
|
type ReasoningEffort = "high" | "max";
|
|
1062
|
+
type EngineeringLifecycleMode = "off" | "strict";
|
|
1092
1063
|
type EmbeddingProvider = "ollama" | "openai-compat";
|
|
1093
1064
|
interface OllamaEmbeddingUserConfig {
|
|
1094
1065
|
baseUrl?: string;
|
|
@@ -1218,6 +1189,14 @@ interface ReasonixConfig {
|
|
|
1218
1189
|
};
|
|
1219
1190
|
pricingOverride?: Record<string, PricingOverride>;
|
|
1220
1191
|
rateLimit?: RateLimitConfig;
|
|
1192
|
+
/** Host-enforced engineering lifecycle. Defaults to off so opt-outs pay zero prefix cost. */
|
|
1193
|
+
engineeringLifecycle?: {
|
|
1194
|
+
mode?: EngineeringLifecycleMode;
|
|
1195
|
+
};
|
|
1196
|
+
filesystem?: {
|
|
1197
|
+
/** read_file flips to outline mode for files above this. Default 64 KiB — keeps the cache prefix slim while covering ~99% of source files. Raise to 524288 (512 KiB) for the pre-0.46.0 "trust the cache" behavior. */
|
|
1198
|
+
outlineThresholdBytes?: number;
|
|
1199
|
+
};
|
|
1221
1200
|
/** QQ Bot configuration */
|
|
1222
1201
|
qq?: QQBotConfig;
|
|
1223
1202
|
}
|
|
@@ -1338,7 +1317,7 @@ interface FilesystemToolsOptions {
|
|
|
1338
1317
|
rootDir: string;
|
|
1339
1318
|
/** false → register only read-side tools. Default true. */
|
|
1340
1319
|
allowWriting?: boolean;
|
|
1341
|
-
/** Files at or under this size get full content; larger go to outline mode. Default
|
|
1320
|
+
/** Files at or under this size get full content; larger go to outline mode. Default 64 KiB. */
|
|
1342
1321
|
outlineThresholdBytes?: number;
|
|
1343
1322
|
/** Cap on total bytes from listing/grep tools — bounds tree-as-one-string accidents. */
|
|
1344
1323
|
maxListBytes?: number;
|
|
@@ -1385,6 +1364,16 @@ interface PlanStep {
|
|
|
1385
1364
|
title: string;
|
|
1386
1365
|
action: string;
|
|
1387
1366
|
risk?: PlanStepRisk;
|
|
1367
|
+
targets?: string[];
|
|
1368
|
+
acceptance?: string;
|
|
1369
|
+
verification?: string[];
|
|
1370
|
+
}
|
|
1371
|
+
type StepEvidenceKind = "verification" | "diff" | "checkpoint" | "manual";
|
|
1372
|
+
interface StepEvidence {
|
|
1373
|
+
kind: StepEvidenceKind;
|
|
1374
|
+
summary: string;
|
|
1375
|
+
command?: string;
|
|
1376
|
+
paths?: string[];
|
|
1388
1377
|
}
|
|
1389
1378
|
interface StepCompletion {
|
|
1390
1379
|
kind: "step_completed";
|
|
@@ -1392,6 +1381,7 @@ interface StepCompletion {
|
|
|
1392
1381
|
title?: string;
|
|
1393
1382
|
result: string;
|
|
1394
1383
|
notes?: string;
|
|
1384
|
+
evidence?: StepEvidence[];
|
|
1395
1385
|
}
|
|
1396
1386
|
|
|
1397
1387
|
/** Plan-mode errors carry `toToolResult` so dispatch serializes structured payloads the TUI parses to mount pickers. */
|
|
@@ -1426,6 +1416,10 @@ interface PlanToolOptions {
|
|
|
1426
1416
|
onPlanSubmitted?: (plan: string, steps?: PlanStep[]) => void;
|
|
1427
1417
|
onStepCompleted?: (update: StepCompletion) => void;
|
|
1428
1418
|
onPlanRevisionProposed?: (reason: string, remainingSteps: PlanStep[], summary?: string) => void;
|
|
1419
|
+
requireStepEvidence?: (args: {
|
|
1420
|
+
stepId: string;
|
|
1421
|
+
title?: string;
|
|
1422
|
+
}) => string | null | undefined;
|
|
1429
1423
|
}
|
|
1430
1424
|
declare function registerPlanTool(registry: ToolRegistry, opts?: PlanToolOptions): ToolRegistry;
|
|
1431
1425
|
|
|
@@ -1739,10 +1733,6 @@ interface WebToolsOptions {
|
|
|
1739
1733
|
defaultTopK?: number;
|
|
1740
1734
|
/** Byte cap for `web_fetch` extracted text. */
|
|
1741
1735
|
maxFetchChars?: number;
|
|
1742
|
-
/** Backend engine: "mojeek" (default, scrapes Mojeek), "searxng" (self-hosted SearXNG), "metaso" (Metaso API), or "tavily" (LLM-friendly API). */
|
|
1743
|
-
webSearchEngine?: "mojeek" | "searxng" | "metaso" | "tavily";
|
|
1744
|
-
/** Base URL for SearXNG (default http://localhost:8080). */
|
|
1745
|
-
webSearchEndpoint?: string;
|
|
1746
1736
|
}
|
|
1747
1737
|
declare function registerWebTools(registry: ToolRegistry, opts?: WebToolsOptions): ToolRegistry;
|
|
1748
1738
|
declare function formatSearchResults(query: string, results: SearchResult[]): string;
|
|
@@ -2391,6 +2381,8 @@ interface CodeSystemPromptOptions {
|
|
|
2391
2381
|
systemAppendFile?: string;
|
|
2392
2382
|
/** Model the loop will run on — interpolated into the escalation contract so the model can name itself correctly when asked (#582). */
|
|
2393
2383
|
modelId?: string;
|
|
2384
|
+
/** Include the lifecycle contract only for users who explicitly opt in. */
|
|
2385
|
+
engineeringLifecycleMode?: "off" | "strict";
|
|
2394
2386
|
}
|
|
2395
2387
|
declare function codeSystemPrompt(rootDir: string, opts?: CodeSystemPromptOptions): string;
|
|
2396
2388
|
|