reasonix 0.38.0 → 0.39.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/{chat-FPEYKTMI.js → chat-QCY6CH7O.js} +17 -16
- package/dist/cli/{chunk-JOFZ6AW5.js → chunk-4D662BWT.js} +2 -2
- package/dist/cli/{chunk-YJKLNYCP.js → chunk-5ZCRXN7S.js} +53 -11
- package/dist/cli/chunk-5ZCRXN7S.js.map +1 -0
- package/dist/cli/{chunk-XOIDSPMQ.js → chunk-6DR4F3MC.js} +20 -6
- package/dist/cli/chunk-6DR4F3MC.js.map +1 -0
- package/dist/cli/{chunk-RFX7TYVV.js → chunk-7G3SESEU.js} +15 -2
- package/dist/cli/chunk-7G3SESEU.js.map +1 -0
- package/dist/cli/chunk-AFFZF3MW.js +36 -0
- package/dist/cli/chunk-AFFZF3MW.js.map +1 -0
- package/dist/cli/{chunk-FYKZB6TX.js → chunk-AJGLCSZS.js} +298 -14
- package/dist/cli/chunk-AJGLCSZS.js.map +1 -0
- package/dist/cli/{chunk-LMNAMITH.js → chunk-AKDDHHE6.js} +2 -2
- package/dist/cli/{chunk-APPB3ZPQ.js → chunk-BQR5TTNY.js} +10 -7
- package/dist/cli/chunk-BQR5TTNY.js.map +1 -0
- package/dist/cli/{chunk-A63QT566.js → chunk-DDA76P44.js} +2 -2
- package/dist/cli/{chunk-3VTV4WAH.js → chunk-NLV2YORE.js} +2 -2
- package/dist/cli/{chunk-LY352GTC.js → chunk-NTVW2TWO.js} +2 -2
- package/dist/cli/{chunk-UNMYFZPZ.js → chunk-SJNIIH5W.js} +112 -112
- package/dist/cli/chunk-SJNIIH5W.js.map +1 -0
- package/dist/cli/{chunk-FB46F6H4.js → chunk-SUZRC4NC.js} +2 -2
- package/dist/cli/{chunk-BW2HWSYH.js → chunk-SWLIVNTP.js} +14 -2
- package/dist/cli/chunk-SWLIVNTP.js.map +1 -0
- package/dist/cli/{chunk-T5U5JO7Q.js → chunk-TGO7X47P.js} +91 -13
- package/dist/cli/chunk-TGO7X47P.js.map +1 -0
- package/dist/cli/{chunk-NYP2DDDV.js → chunk-TPDWAMG6.js} +1 -12
- package/dist/cli/{chunk-NYP2DDDV.js.map → chunk-TPDWAMG6.js.map} +1 -1
- package/dist/cli/{chunk-4PNXH2MH.js → chunk-TPK2CHWR.js} +483 -348
- package/dist/cli/chunk-TPK2CHWR.js.map +1 -0
- package/dist/cli/{chunk-AATCLE5N.js → chunk-V5D77TFD.js} +2 -2
- package/dist/cli/{code-GTE65OUT.js → code-3BBVXXY6.js} +20 -18
- package/dist/cli/code-3BBVXXY6.js.map +1 -0
- package/dist/cli/{commands-R4JWISND.js → commands-PJMHSP3Z.js} +3 -3
- package/dist/cli/{commit-TQ4DMUNS.js → commit-R6SC44W5.js} +2 -2
- package/dist/cli/{diff-NTEHCSDW.js → diff-LXBBKOZA.js} +17 -9
- package/dist/cli/diff-LXBBKOZA.js.map +1 -0
- package/dist/cli/{doctor-GGK2JKTA.js → doctor-ZBUEBRXP.js} +9 -6
- package/dist/cli/index.js +55 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-M7I23TQ7.js → mcp-RABKZDX4.js} +12 -3
- package/dist/cli/mcp-RABKZDX4.js.map +1 -0
- package/dist/cli/{mcp-browse-TWO7RYT4.js → mcp-browse-H6O73SHN.js} +2 -2
- package/dist/cli/{mcp-inspect-CWSVCZUQ.js → mcp-inspect-XWBO52H6.js} +9 -7
- package/dist/cli/mcp-inspect-XWBO52H6.js.map +1 -0
- package/dist/cli/{prompt-ODPFOKSH.js → prompt-CZSOFYK6.js} +3 -3
- package/dist/cli/{replay-R3QRXPI2.js → replay-TWTUIUUB.js} +8 -8
- package/dist/cli/replay-TWTUIUUB.js.map +1 -0
- package/dist/cli/{run-WGSPYYOJ.js → run-RWBLIICY.js} +15 -14
- package/dist/cli/run-RWBLIICY.js.map +1 -0
- package/dist/cli/{server-IZPWQYG3.js → server-EPU4QONU.js} +21 -18
- package/dist/cli/server-EPU4QONU.js.map +1 -0
- package/dist/cli/{sessions-E4UH5JYL.js → sessions-TWUFHOUX.js} +9 -9
- package/dist/cli/{setup-FTZNN3TZ.js → setup-WHXXHIZV.js} +6 -6
- package/dist/cli/setup-WHXXHIZV.js.map +1 -0
- package/dist/cli/{version-MDVCFTKA.js → version-RAMBOIYL.js} +9 -9
- package/dist/index.d.ts +19 -2
- package/dist/index.js +361 -20
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/dist/cli/chunk-4PNXH2MH.js.map +0 -1
- package/dist/cli/chunk-APPB3ZPQ.js.map +0 -1
- package/dist/cli/chunk-BW2HWSYH.js.map +0 -1
- package/dist/cli/chunk-FYKZB6TX.js.map +0 -1
- package/dist/cli/chunk-RFX7TYVV.js.map +0 -1
- package/dist/cli/chunk-T5U5JO7Q.js.map +0 -1
- package/dist/cli/chunk-UNMYFZPZ.js.map +0 -1
- package/dist/cli/chunk-XOIDSPMQ.js.map +0 -1
- package/dist/cli/chunk-YJKLNYCP.js.map +0 -1
- package/dist/cli/code-GTE65OUT.js.map +0 -1
- package/dist/cli/diff-NTEHCSDW.js.map +0 -1
- package/dist/cli/mcp-M7I23TQ7.js.map +0 -1
- package/dist/cli/mcp-inspect-CWSVCZUQ.js.map +0 -1
- package/dist/cli/replay-R3QRXPI2.js.map +0 -1
- package/dist/cli/run-WGSPYYOJ.js.map +0 -1
- package/dist/cli/server-IZPWQYG3.js.map +0 -1
- package/dist/cli/setup-FTZNN3TZ.js.map +0 -1
- /package/dist/cli/{chat-FPEYKTMI.js.map → chat-QCY6CH7O.js.map} +0 -0
- /package/dist/cli/{chunk-JOFZ6AW5.js.map → chunk-4D662BWT.js.map} +0 -0
- /package/dist/cli/{chunk-LMNAMITH.js.map → chunk-AKDDHHE6.js.map} +0 -0
- /package/dist/cli/{chunk-A63QT566.js.map → chunk-DDA76P44.js.map} +0 -0
- /package/dist/cli/{chunk-3VTV4WAH.js.map → chunk-NLV2YORE.js.map} +0 -0
- /package/dist/cli/{chunk-LY352GTC.js.map → chunk-NTVW2TWO.js.map} +0 -0
- /package/dist/cli/{chunk-FB46F6H4.js.map → chunk-SUZRC4NC.js.map} +0 -0
- /package/dist/cli/{chunk-AATCLE5N.js.map → chunk-V5D77TFD.js.map} +0 -0
- /package/dist/cli/{commands-R4JWISND.js.map → commands-PJMHSP3Z.js.map} +0 -0
- /package/dist/cli/{commit-TQ4DMUNS.js.map → commit-R6SC44W5.js.map} +0 -0
- /package/dist/cli/{doctor-GGK2JKTA.js.map → doctor-ZBUEBRXP.js.map} +0 -0
- /package/dist/cli/{mcp-browse-TWO7RYT4.js.map → mcp-browse-H6O73SHN.js.map} +0 -0
- /package/dist/cli/{prompt-ODPFOKSH.js.map → prompt-CZSOFYK6.js.map} +0 -0
- /package/dist/cli/{sessions-E4UH5JYL.js.map → sessions-TWUFHOUX.js.map} +0 -0
- /package/dist/cli/{version-MDVCFTKA.js.map → version-RAMBOIYL.js.map} +0 -0
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
chatCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TPK2CHWR.js";
|
|
5
5
|
import "./chunk-BQNUJJN7.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-7G3SESEU.js";
|
|
7
7
|
import "./chunk-MRLXEMZ7.js";
|
|
8
8
|
import "./chunk-CPOV2O73.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-5ZCRXN7S.js";
|
|
10
|
+
import "./chunk-SJNIIH5W.js";
|
|
11
11
|
import "./chunk-XJLZ4HKU.js";
|
|
12
12
|
import "./chunk-XHQIK7B6.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-DDA76P44.js";
|
|
14
|
+
import "./chunk-NLV2YORE.js";
|
|
15
|
+
import "./chunk-SUZRC4NC.js";
|
|
16
16
|
import "./chunk-MHDNZXJJ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-TGO7X47P.js";
|
|
18
|
+
import "./chunk-AFFZF3MW.js";
|
|
18
19
|
import "./chunk-DAEAAVDF.js";
|
|
19
20
|
import "./chunk-KMWKGPFZ.js";
|
|
20
21
|
import "./chunk-3Q3C4W66.js";
|
|
21
22
|
import "./chunk-4DCHFFEY.js";
|
|
22
23
|
import "./chunk-WJ3YX4PZ.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TPDWAMG6.js";
|
|
24
25
|
import "./chunk-SOZE7V7V.js";
|
|
25
26
|
import "./chunk-6NMWJSES.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-NTVW2TWO.js";
|
|
28
|
+
import "./chunk-6DR4F3MC.js";
|
|
28
29
|
import "./chunk-FM57FNPJ.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-4D662BWT.js";
|
|
31
|
+
import "./chunk-AKDDHHE6.js";
|
|
31
32
|
import "./chunk-5X7LZJDE.js";
|
|
32
33
|
import "./chunk-6CXT5JRM.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-AJGLCSZS.js";
|
|
35
|
+
import "./chunk-SWLIVNTP.js";
|
|
35
36
|
import "./chunk-ZTLZO42A.js";
|
|
36
37
|
import "./chunk-ORM6PK57.js";
|
|
37
38
|
import "./chunk-CRPQUBP6.js";
|
|
38
39
|
export {
|
|
39
40
|
chatCommand
|
|
40
41
|
};
|
|
41
|
-
//# sourceMappingURL=chat-
|
|
42
|
+
//# sourceMappingURL=chat-QCY6CH7O.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
compileFilters,
|
|
8
8
|
defaultIndexConfig,
|
|
9
9
|
resolveSemanticEmbeddingConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SWLIVNTP.js";
|
|
11
11
|
|
|
12
12
|
// src/index/semantic/builder.ts
|
|
13
13
|
import { promises as fs3 } from "fs";
|
|
@@ -948,4 +948,4 @@ export {
|
|
|
948
948
|
startOllamaDaemon,
|
|
949
949
|
pullOllamaModel
|
|
950
950
|
};
|
|
951
|
-
//# sourceMappingURL=chunk-
|
|
951
|
+
//# sourceMappingURL=chunk-4D662BWT.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
MemoryStore,
|
|
4
4
|
sanitizeMemoryName
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DDA76P44.js";
|
|
6
6
|
import {
|
|
7
7
|
countTokens,
|
|
8
8
|
estimateConversationTokens,
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
} from "./chunk-KMWKGPFZ.js";
|
|
14
14
|
import {
|
|
15
15
|
pauseGate
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NTVW2TWO.js";
|
|
17
17
|
import {
|
|
18
18
|
NEGATIVE_CLAIM_RULE,
|
|
19
19
|
TUI_FORMATTING_RULES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6DR4F3MC.js";
|
|
21
21
|
import {
|
|
22
22
|
formatHookOutcomeMessage,
|
|
23
23
|
runHooks
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AKDDHHE6.js";
|
|
25
25
|
import {
|
|
26
26
|
ignoredByLayers,
|
|
27
27
|
loadGitignoreAt,
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
} from "./chunk-6CXT5JRM.js";
|
|
37
37
|
import {
|
|
38
38
|
t
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-AJGLCSZS.js";
|
|
40
40
|
import {
|
|
41
41
|
DEFAULT_INDEX_EXCLUDES,
|
|
42
42
|
webSearchEndpoint,
|
|
43
43
|
webSearchEngine
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SWLIVNTP.js";
|
|
45
45
|
import {
|
|
46
46
|
DEEPSEEK_CONTEXT_TOKENS,
|
|
47
47
|
DEFAULT_CONTEXT_TOKENS,
|
|
@@ -287,6 +287,8 @@ var ToolRegistry = class {
|
|
|
287
287
|
_interceptor = null;
|
|
288
288
|
_auditListener = null;
|
|
289
289
|
_resultAugmenter = null;
|
|
290
|
+
/** Per-tool fingerprint of the last call that failed schema validation. Cleared by any successful validation for that tool. */
|
|
291
|
+
_lastMalformed = /* @__PURE__ */ new Map();
|
|
290
292
|
constructor(opts = {}) {
|
|
291
293
|
this._autoFlatten = opts.autoFlatten !== false;
|
|
292
294
|
}
|
|
@@ -361,17 +363,29 @@ var ToolRegistry = class {
|
|
|
361
363
|
if (!tool) {
|
|
362
364
|
return JSON.stringify({ error: `unknown tool: ${name}` });
|
|
363
365
|
}
|
|
366
|
+
const fingerprint = fingerprintArgs(argumentsRaw);
|
|
364
367
|
let args;
|
|
365
368
|
try {
|
|
366
369
|
args = typeof argumentsRaw === "string" ? argumentsRaw.trim() ? JSON.parse(argumentsRaw) ?? {} : {} : argumentsRaw ?? {};
|
|
367
370
|
} catch (err) {
|
|
368
|
-
return
|
|
369
|
-
|
|
370
|
-
|
|
371
|
+
return this._noteMalformed(
|
|
372
|
+
name,
|
|
373
|
+
fingerprint,
|
|
374
|
+
`invalid tool arguments JSON: ${err.message}`
|
|
375
|
+
);
|
|
371
376
|
}
|
|
372
377
|
if (tool.flatSchema && args && typeof args === "object" && hasDotKey(args)) {
|
|
373
378
|
args = nestArguments(args);
|
|
374
379
|
}
|
|
380
|
+
const missing = tool.parameters ? missingRequiredParam(tool.parameters, args) : null;
|
|
381
|
+
if (missing) {
|
|
382
|
+
return this._noteMalformed(
|
|
383
|
+
name,
|
|
384
|
+
fingerprint,
|
|
385
|
+
`missing required parameter "${missing}". Retry with all required parameters filled.`
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
this._lastMalformed.delete(name);
|
|
375
389
|
if (this._planMode && !isReadOnlyCall(tool, args)) {
|
|
376
390
|
return JSON.stringify({
|
|
377
391
|
error: `${name}: unavailable in plan mode \u2014 this is a read-only exploration phase. Use read_file / list_directory / search_files / directory_tree / web_search / allowlisted shell commands to investigate. Call submit_plan with your proposed plan when you're ready for the user's review.`,
|
|
@@ -427,6 +441,18 @@ var ToolRegistry = class {
|
|
|
427
441
|
}
|
|
428
442
|
return finalResult;
|
|
429
443
|
}
|
|
444
|
+
/** 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. */
|
|
445
|
+
_noteMalformed(name, fingerprint, detail) {
|
|
446
|
+
const prev = this._lastMalformed.get(name);
|
|
447
|
+
this._lastMalformed.set(name, fingerprint);
|
|
448
|
+
if (prev === fingerprint) {
|
|
449
|
+
return JSON.stringify({
|
|
450
|
+
error: `${name}: same call just failed validation (${detail}) \u2014 DO NOT retry with identical args. Either fix the call (read the schema in the tool spec) or pick a different tool.`,
|
|
451
|
+
consecutiveMalformed: true
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
return JSON.stringify({ error: `${name}: ${detail}` });
|
|
455
|
+
}
|
|
430
456
|
};
|
|
431
457
|
function isReadOnlyCall(tool, args) {
|
|
432
458
|
if (tool.readOnlyCheck) {
|
|
@@ -444,6 +470,22 @@ function hasDotKey(obj) {
|
|
|
444
470
|
}
|
|
445
471
|
return false;
|
|
446
472
|
}
|
|
473
|
+
function fingerprintArgs(argumentsRaw) {
|
|
474
|
+
if (typeof argumentsRaw === "string") return argumentsRaw;
|
|
475
|
+
try {
|
|
476
|
+
return JSON.stringify(argumentsRaw);
|
|
477
|
+
} catch {
|
|
478
|
+
return "";
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function missingRequiredParam(schema, args) {
|
|
482
|
+
const required = schema.required;
|
|
483
|
+
if (!required || required.length === 0) return null;
|
|
484
|
+
for (const key of required) {
|
|
485
|
+
if (args[key] === void 0) return key;
|
|
486
|
+
}
|
|
487
|
+
return null;
|
|
488
|
+
}
|
|
447
489
|
|
|
448
490
|
// src/memory/runtime.ts
|
|
449
491
|
import { createHash } from "crypto";
|
|
@@ -3435,7 +3477,7 @@ function registerChoiceTool(registry, opts = {}) {
|
|
|
3435
3477
|
|
|
3436
3478
|
// src/tools/plan-core.ts
|
|
3437
3479
|
var SUBMIT_PLAN_DESCRIPTION = "Submit ONE concrete plan you've already decided on. Use this for tasks that warrant a review gate \u2014 multi-file refactors, architecture changes, anything that would be expensive or confusing to undo. Skip it for small fixes (one-line typo, obvious bug with a clear fix) \u2014 just make the change. The user will either approve (you then implement it), ask for refinement, or cancel. If the user has already enabled /plan mode, writes are blocked at dispatch and you MUST use this. CRITICAL: do NOT use submit_plan to present alternative routes (A/B/C, option 1/2/3) for the user to pick from \u2014 the picker only exposes approve/refine/cancel, so a menu plan strands the user with no way to choose. For branching decisions, call `ask_choice` instead; only call submit_plan once the user has picked a direction and you have a single actionable plan. Write the plan as markdown with a one-line summary, a bulleted list of files to touch and what will change, and any risks or open questions. STRONGLY PREFERRED: pass `steps` \u2014 an array of {id, title, action, risk?} \u2014 so the UI renders a structured step list above the approval picker and tracks per-step progress. Use risk='high' for steps that touch prod data / break public APIs / are hard to undo; 'med' for non-trivial but reversible (multi-file edits, schema tweaks); 'low' for safe local work. After each step, call `mark_step_complete` so the user sees progress ticks.";
|
|
3438
|
-
var MARK_STEP_COMPLETE_DESCRIPTION = "Mark one step of the approved plan as done.
|
|
3480
|
+
var MARK_STEP_COMPLETE_DESCRIPTION = "Mark one step of the approved plan as done. MANDATORY: call this exactly once after finishing each step, before starting the next one \u2014 skipping it leaves the user staring at `0/N done` on the resume banner even when the work is finished, and they have no way to know which steps actually ran. The TUI updates the plan card's progress in place; the count is persisted to disk so it survives session resume. After the FINAL step, write a brief reply summarizing what was done and end the turn. Pass the `stepId` from the plan's steps array, a short `result` (what you did), and optional `notes` for anything surprising (errors, scope changes, follow-ups). This tool doesn't change any files. Don't call it if the plan didn't include structured steps, and don't invent ids that weren't in the original plan. If you only realized at the end that you skipped marking steps, mark them then \u2014 late is still better than never.";
|
|
3439
3481
|
var REVISE_PLAN_DESCRIPTION = "Surgically replace the REMAINING steps of an in-flight plan. Call this when the user has given feedback at a checkpoint that warrants a structured plan change \u2014 skip a step, swap two steps, add a new step, change risk, etc. Pass: `reason` (one sentence why), `remainingSteps` (the new tail of the plan, replacing whatever steps haven't been done yet), and optional `summary` (updated one-line plan summary). Done steps are NEVER touched \u2014 keep them out of `remainingSteps`. The TUI shows a diff (removed in red, kept in gray, added in green) and the user accepts or rejects. Don't call this for trivial mid-step adjustments \u2014 just keep executing. Don't call submit_plan for revisions either \u2014 that resets the whole plan including completed steps. Use submit_plan only when the entire approach has changed; use revise_plan when the tail needs editing.";
|
|
3440
3482
|
var STEP_ITEM_SCHEMA = {
|
|
3441
3483
|
type: "object",
|
|
@@ -5166,4 +5208,4 @@ export {
|
|
|
5166
5208
|
snapshotBeforeEdits,
|
|
5167
5209
|
restoreSnapshots
|
|
5168
5210
|
};
|
|
5169
|
-
//# sourceMappingURL=chunk-
|
|
5211
|
+
//# sourceMappingURL=chunk-5ZCRXN7S.js.map
|