@orquentra/codebuddy 2.6.2 → 2.8.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/README.md +10 -0
- package/dist/adapters-S4HHTWJW.js +24 -0
- package/dist/{chunk-IBLJOHJL.js → chunk-3QGW53GD.js} +2 -2
- package/dist/{chunk-IMFUYEZA.js → chunk-6DONJW3W.js} +232 -64
- package/dist/chunk-6DONJW3W.js.map +1 -0
- package/dist/{chunk-JFDRBPYF.js → chunk-6JCKMIQY.js} +2 -2
- package/dist/{chunk-S6VEG4S2.js → chunk-6KGYAFG7.js} +28 -5
- package/dist/chunk-6KGYAFG7.js.map +1 -0
- package/dist/{chunk-OWWCDRXW.js → chunk-6NZEZJYD.js} +9 -7
- package/dist/chunk-6NZEZJYD.js.map +1 -0
- package/dist/{chunk-GDJH7XJC.js → chunk-AL6VBTNA.js} +77 -3
- package/dist/chunk-AL6VBTNA.js.map +1 -0
- package/dist/{chunk-XBJQKCLU.js → chunk-CAEPHLHC.js} +13 -9
- package/dist/chunk-CAEPHLHC.js.map +1 -0
- package/dist/chunk-CG5B3LYG.js +66 -0
- package/dist/chunk-CG5B3LYG.js.map +1 -0
- package/dist/{chunk-IHQM2ZDV.js → chunk-DFV2SK6C.js} +1 -1
- package/dist/{chunk-IHQM2ZDV.js.map → chunk-DFV2SK6C.js.map} +1 -1
- package/dist/{chunk-QBDJXGG5.js → chunk-EJQVGFH2.js} +93 -22
- package/dist/chunk-EJQVGFH2.js.map +1 -0
- package/dist/{chunk-5MQOE4J6.js → chunk-ESZXCZIN.js} +3 -3
- package/dist/{chunk-J2EAZ4MA.js → chunk-GKNYMNFM.js} +22 -25
- package/dist/chunk-GKNYMNFM.js.map +1 -0
- package/dist/{chunk-5FW3PMNP.js → chunk-GXOML4UZ.js} +76 -11
- package/dist/chunk-GXOML4UZ.js.map +1 -0
- package/dist/{chunk-JPHJBCZB.js → chunk-HPOR6YXA.js} +3 -2
- package/dist/chunk-HPOR6YXA.js.map +1 -0
- package/dist/chunk-ITQO632W.js +673 -0
- package/dist/chunk-ITQO632W.js.map +1 -0
- package/dist/chunk-J4T6HHI4.js +1444 -0
- package/dist/chunk-J4T6HHI4.js.map +1 -0
- package/dist/{chunk-5KZY6OTG.js → chunk-KNR2P2UY.js} +33 -83
- package/dist/chunk-KNR2P2UY.js.map +1 -0
- package/dist/{chunk-2XDPKFUW.js → chunk-NY2YXP3R.js} +46 -20
- package/dist/chunk-NY2YXP3R.js.map +1 -0
- package/dist/{chunk-RAJJSCIP.js → chunk-SFMIMLXR.js} +2 -2
- package/dist/chunk-TGFTKWOR.js +16 -0
- package/dist/chunk-TGFTKWOR.js.map +1 -0
- package/dist/{chunk-NERKZSSE.js → chunk-TLWGZVPC.js} +395 -686
- package/dist/chunk-TLWGZVPC.js.map +1 -0
- package/dist/{chunk-B6CO63SQ.js → chunk-UK6XTS2Y.js} +24 -10
- package/dist/chunk-UK6XTS2Y.js.map +1 -0
- package/dist/chunk-W7GAXL6C.js +104 -0
- package/dist/chunk-W7GAXL6C.js.map +1 -0
- package/dist/chunk-XL2HLACE.js +55 -0
- package/dist/chunk-XL2HLACE.js.map +1 -0
- package/dist/chunk-Y7D7PUBE.js +321 -0
- package/dist/chunk-Y7D7PUBE.js.map +1 -0
- package/dist/{chunk-R7CD6EXS.js → chunk-ZNLSCV3J.js} +578 -381
- package/dist/chunk-ZNLSCV3J.js.map +1 -0
- package/dist/cli/index.js +5 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/{cloud-7WM3YLI4.js → cloud-LXZUR3U2.js} +3 -3
- package/dist/{codebuddy-B_pCaQrV.d.ts → codebuddy-DO7ZhoWn.d.ts} +15 -1
- package/dist/config-GEZFLXK6.js +12 -0
- package/dist/index.d.ts +46 -3
- package/dist/index.js +23 -19
- package/dist/install-BXM56QCD.js +19 -0
- package/dist/langgraph/index.d.ts +1 -1
- package/dist/lean-command-7DFW32MA.js +19 -0
- package/dist/{local-5MZURLCZ.js → local-ST4WMRCG.js} +3 -3
- package/dist/{main-MTBQZGJV.js → main-QUASSFP7.js} +987 -1741
- package/dist/main-QUASSFP7.js.map +1 -0
- package/dist/{memory-KIC5FJVW.js → memory-TGHVTBME.js} +9 -8
- package/dist/memory-TGHVTBME.js.map +1 -0
- package/dist/operations-WJR7AZZF.js +26 -0
- package/dist/pretool-command-JTKX6G3M.js +13 -0
- package/dist/{rerank-5QZ3PNUW.js → rerank-IQAEWLQR.js} +6 -5
- package/dist/rerank-IQAEWLQR.js.map +1 -0
- package/dist/{runtime-CUBOOPZO.js → runtime-OQQ22VJF.js} +15 -11
- package/dist/summaries-ML53R7EL.js +21 -0
- package/dist/summaries-ML53R7EL.js.map +1 -0
- package/dist/{zvec-MSRKT7IV.js → zvec-XDZNZ2OL.js} +11 -3
- package/dist/zvec-XDZNZ2OL.js.map +1 -0
- package/package.json +1 -1
- package/src/db/migrations/0006_fact_idempotency_key.sql +2 -0
- package/src/db/migrations/meta/0006_snapshot.json +1258 -0
- package/src/db/migrations/meta/_journal.json +7 -0
- package/dist/chunk-2XDPKFUW.js.map +0 -1
- package/dist/chunk-5FW3PMNP.js.map +0 -1
- package/dist/chunk-5KZY6OTG.js.map +0 -1
- package/dist/chunk-B6CO63SQ.js.map +0 -1
- package/dist/chunk-GDJH7XJC.js.map +0 -1
- package/dist/chunk-IMFUYEZA.js.map +0 -1
- package/dist/chunk-J2EAZ4MA.js.map +0 -1
- package/dist/chunk-JPHJBCZB.js.map +0 -1
- package/dist/chunk-NERKZSSE.js.map +0 -1
- package/dist/chunk-OWWCDRXW.js.map +0 -1
- package/dist/chunk-PQK3GKZH.js +0 -98
- package/dist/chunk-PQK3GKZH.js.map +0 -1
- package/dist/chunk-QBDJXGG5.js.map +0 -1
- package/dist/chunk-R7CD6EXS.js.map +0 -1
- package/dist/chunk-S6VEG4S2.js.map +0 -1
- package/dist/chunk-XBJQKCLU.js.map +0 -1
- package/dist/config-DEVHUDIU.js +0 -11
- package/dist/lean-command-HTQCPH76.js +0 -15
- package/dist/main-MTBQZGJV.js.map +0 -1
- package/dist/memory-KIC5FJVW.js.map +0 -1
- package/dist/operations-POCHY3WR.js +0 -25
- package/dist/pretool-command-AX6JXP25.js +0 -10
- package/dist/rerank-5QZ3PNUW.js.map +0 -1
- package/dist/summaries-SB5L2TSW.js +0 -18
- /package/dist/{cloud-7WM3YLI4.js.map → adapters-S4HHTWJW.js.map} +0 -0
- /package/dist/{chunk-IBLJOHJL.js.map → chunk-3QGW53GD.js.map} +0 -0
- /package/dist/{chunk-JFDRBPYF.js.map → chunk-6JCKMIQY.js.map} +0 -0
- /package/dist/{chunk-5MQOE4J6.js.map → chunk-ESZXCZIN.js.map} +0 -0
- /package/dist/{chunk-RAJJSCIP.js.map → chunk-SFMIMLXR.js.map} +0 -0
- /package/dist/{config-DEVHUDIU.js.map → cloud-LXZUR3U2.js.map} +0 -0
- /package/dist/{lean-command-HTQCPH76.js.map → config-GEZFLXK6.js.map} +0 -0
- /package/dist/{local-5MZURLCZ.js.map → install-BXM56QCD.js.map} +0 -0
- /package/dist/{operations-POCHY3WR.js.map → lean-command-7DFW32MA.js.map} +0 -0
- /package/dist/{pretool-command-AX6JXP25.js.map → local-ST4WMRCG.js.map} +0 -0
- /package/dist/{runtime-CUBOOPZO.js.map → operations-WJR7AZZF.js.map} +0 -0
- /package/dist/{summaries-SB5L2TSW.js.map → pretool-command-JTKX6G3M.js.map} +0 -0
- /package/dist/{zvec-MSRKT7IV.js.map → runtime-OQQ22VJF.js.map} +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
// src/cli/index.ts
|
|
4
4
|
var [command, subcommand] = process.argv.slice(2);
|
|
5
5
|
if (command === "hooks" && subcommand === "lean") {
|
|
6
|
-
const { runLeanHookCommand } = await import("../lean-command-
|
|
6
|
+
const { runLeanHookCommand } = await import("../lean-command-7DFW32MA.js");
|
|
7
7
|
await runLeanHookCommand();
|
|
8
8
|
} else if (command === "hooks" && subcommand === "pretool") {
|
|
9
|
-
const { runPreToolHookCommand } = await import("../pretool-command-
|
|
9
|
+
const { runPreToolHookCommand } = await import("../pretool-command-JTKX6G3M.js");
|
|
10
10
|
await runPreToolHookCommand();
|
|
11
11
|
} else if (command === "hooks" && (subcommand === "context" || subcommand === "stage" || subcommand === "reset")) {
|
|
12
12
|
const [{ failSoft, readHookInput, writeStdout }, runtime] = await Promise.all([
|
|
13
13
|
import("../stdio-HOV4P3DQ.js"),
|
|
14
|
-
import("../runtime-
|
|
14
|
+
import("../runtime-OQQ22VJF.js")
|
|
15
15
|
]);
|
|
16
16
|
await failSoft(async () => {
|
|
17
17
|
const input = await readHookInput();
|
|
18
18
|
if (subcommand === "context") await runtime.runContextHook(input, writeStdout);
|
|
19
19
|
else if (subcommand === "stage") await runtime.runStageHook(input);
|
|
20
|
-
else await runtime.runResetHook(input);
|
|
20
|
+
else await runtime.runResetHook(input, writeStdout);
|
|
21
21
|
});
|
|
22
22
|
} else {
|
|
23
|
-
const { createCli } = await import("../main-
|
|
23
|
+
const { createCli } = await import("../main-QUASSFP7.js");
|
|
24
24
|
await createCli().parseAsync();
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Launcher. Hooks that fire on every prompt (context, lean), every edit\n * (stage), every Read/Grep (pretool) or on compaction (reset) load only their\n * own modules, skipping the database driver, MCP server and command tree\n * (~190 ms per process); every other command loads the full CLI. The\n * runtime calls match `codebuddy hooks <name>` in commands/hooks.ts.\n */\nconst [command, subcommand] = process.argv.slice(2);\nif (command === \"hooks\" && subcommand === \"lean\") {\n const { runLeanHookCommand } = await import(\"../hooks/lean-command.js\");\n await runLeanHookCommand();\n} else if (command === \"hooks\" && subcommand === \"pretool\") {\n const { runPreToolHookCommand } = await import(\"../hooks/pretool-command.js\");\n await runPreToolHookCommand();\n} else if (\n command === \"hooks\" &&\n (subcommand === \"context\" || subcommand === \"stage\" || subcommand === \"reset\")\n) {\n const [{ failSoft, readHookInput, writeStdout }, runtime] = await Promise.all([\n import(\"../hooks/stdio.js\"),\n import(\"../hooks/runtime.js\"),\n ]);\n await failSoft(async () => {\n const input = await readHookInput();\n if (subcommand === \"context\") await runtime.runContextHook(input, writeStdout);\n else if (subcommand === \"stage\") await runtime.runStageHook(input);\n else await runtime.runResetHook(input);\n });\n} else {\n const { createCli } = await import(\"./main.js\");\n await createCli().parseAsync();\n}\n"],"mappings":";;;AAQA,IAAM,CAAC,SAAS,UAAU,IAAI,QAAQ,KAAK,MAAM,CAAC;AAClD,IAAI,YAAY,WAAW,eAAe,QAAQ;AAChD,QAAM,EAAE,mBAAmB,IAAI,MAAM,OAAO,6BAA0B;AACtE,QAAM,mBAAmB;AAC3B,WAAW,YAAY,WAAW,eAAe,WAAW;AAC1D,QAAM,EAAE,sBAAsB,IAAI,MAAM,OAAO,gCAA6B;AAC5E,QAAM,sBAAsB;AAC9B,WACE,YAAY,YACX,eAAe,aAAa,eAAe,WAAW,eAAe,UACtE;AACA,QAAM,CAAC,EAAE,UAAU,eAAe,YAAY,GAAG,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC5E,OAAO,sBAAmB;AAAA,IAC1B,OAAO,wBAAqB;AAAA,EAC9B,CAAC;AACD,QAAM,SAAS,YAAY;AACzB,UAAM,QAAQ,MAAM,cAAc;AAClC,QAAI,eAAe,UAAW,OAAM,QAAQ,eAAe,OAAO,WAAW;AAAA,aACpE,eAAe,QAAS,OAAM,QAAQ,aAAa,KAAK;AAAA,QAC5D,OAAM,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../src/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Launcher. Hooks that fire on every prompt (context, lean), every edit\n * (stage), every Read/Grep (pretool) or on compaction (reset) load only their\n * own modules, skipping the database driver, MCP server and command tree\n * (~190 ms per process); every other command loads the full CLI. The\n * runtime calls match `codebuddy hooks <name>` in commands/hooks.ts.\n */\nconst [command, subcommand] = process.argv.slice(2);\nif (command === \"hooks\" && subcommand === \"lean\") {\n const { runLeanHookCommand } = await import(\"../hooks/lean-command.js\");\n await runLeanHookCommand();\n} else if (command === \"hooks\" && subcommand === \"pretool\") {\n const { runPreToolHookCommand } = await import(\"../hooks/pretool-command.js\");\n await runPreToolHookCommand();\n} else if (\n command === \"hooks\" &&\n (subcommand === \"context\" || subcommand === \"stage\" || subcommand === \"reset\")\n) {\n const [{ failSoft, readHookInput, writeStdout }, runtime] = await Promise.all([\n import(\"../hooks/stdio.js\"),\n import(\"../hooks/runtime.js\"),\n ]);\n await failSoft(async () => {\n const input = await readHookInput();\n if (subcommand === \"context\") await runtime.runContextHook(input, writeStdout);\n else if (subcommand === \"stage\") await runtime.runStageHook(input);\n else await runtime.runResetHook(input, writeStdout);\n });\n} else {\n const { createCli } = await import(\"./main.js\");\n await createCli().parseAsync();\n}\n"],"mappings":";;;AAQA,IAAM,CAAC,SAAS,UAAU,IAAI,QAAQ,KAAK,MAAM,CAAC;AAClD,IAAI,YAAY,WAAW,eAAe,QAAQ;AAChD,QAAM,EAAE,mBAAmB,IAAI,MAAM,OAAO,6BAA0B;AACtE,QAAM,mBAAmB;AAC3B,WAAW,YAAY,WAAW,eAAe,WAAW;AAC1D,QAAM,EAAE,sBAAsB,IAAI,MAAM,OAAO,gCAA6B;AAC5E,QAAM,sBAAsB;AAC9B,WACE,YAAY,YACX,eAAe,aAAa,eAAe,WAAW,eAAe,UACtE;AACA,QAAM,CAAC,EAAE,UAAU,eAAe,YAAY,GAAG,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC5E,OAAO,sBAAmB;AAAA,IAC1B,OAAO,wBAAqB;AAAA,EAC9B,CAAC;AACD,QAAM,SAAS,YAAY;AACzB,UAAM,QAAQ,MAAM,cAAc;AAClC,QAAI,eAAe,UAAW,OAAM,QAAQ,eAAe,OAAO,WAAW;AAAA,aACpE,eAAe,QAAS,OAAM,QAAQ,aAAa,KAAK;AAAA,QAC5D,OAAM,QAAQ,aAAa,OAAO,WAAW;AAAA,EACpD,CAAC;AACH,OAAO;AACL,QAAM,EAAE,UAAU,IAAI,MAAM,OAAO,qBAAW;AAC9C,QAAM,UAAU,EAAE,WAAW;AAC/B;","names":[]}
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
OpenRouterEmbeddingProvider,
|
|
5
5
|
rerankHuggingFace,
|
|
6
6
|
rerankOpenRouter
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-6JCKMIQY.js";
|
|
8
|
+
import "./chunk-HPOR6YXA.js";
|
|
9
9
|
import "./chunk-PZ5AY32C.js";
|
|
10
10
|
export {
|
|
11
11
|
HF_ROUTER_BASE_URL,
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
rerankHuggingFace,
|
|
15
15
|
rerankOpenRouter
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=cloud-
|
|
17
|
+
//# sourceMappingURL=cloud-LXZUR3U2.js.map
|
|
@@ -68,6 +68,8 @@ type ProviderConfig = {
|
|
|
68
68
|
model?: string;
|
|
69
69
|
/** Cosine floor for dense recall; overrides the built-in calibration (`models calibrate`). */
|
|
70
70
|
relevanceFloor?: number;
|
|
71
|
+
/** Looser floor for an explicit `recall` (the agent asked); overrides the built-in one. */
|
|
72
|
+
recallFloor?: number;
|
|
71
73
|
};
|
|
72
74
|
type WorkerConfig = {
|
|
73
75
|
pollIntervalMs?: number;
|
|
@@ -164,6 +166,8 @@ type FactInsert = {
|
|
|
164
166
|
object: string;
|
|
165
167
|
/** Explicit single-valued proposition identity; null/absent allows multiple values. */
|
|
166
168
|
propositionKey?: string | null | undefined;
|
|
169
|
+
/** The caller's retry key; a write carrying a known key returns that fact. */
|
|
170
|
+
idempotencyKey?: string | null | undefined;
|
|
167
171
|
/** Imported provenance/lifecycle from the Markdown source; defaults apply when absent. */
|
|
168
172
|
confidence?: number | undefined;
|
|
169
173
|
createdAt?: Date | undefined;
|
|
@@ -510,6 +514,12 @@ type PlanInput = {
|
|
|
510
514
|
conflictMode: ConflictMode;
|
|
511
515
|
queryEmbedding: QueryEmbedding | null;
|
|
512
516
|
repository: MemoryRepository;
|
|
517
|
+
/**
|
|
518
|
+
* Calibrated cosine at or above which a vector match is relevant for this
|
|
519
|
+
* embedding model (the same floor the prompt hook uses). Without it, the
|
|
520
|
+
* policy's generic minimum applies.
|
|
521
|
+
*/
|
|
522
|
+
relevanceFloor?: number | undefined;
|
|
513
523
|
};
|
|
514
524
|
/** Structured provenance for a recalled fact; `conflict` is set when its proposition key had rivals. */
|
|
515
525
|
type FactProvenance = {
|
|
@@ -600,6 +610,7 @@ declare const codeBuddyConfigSchema: z.ZodObject<{
|
|
|
600
610
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
601
611
|
model: z.ZodOptional<z.ZodString>;
|
|
602
612
|
relevanceFloor: z.ZodOptional<z.ZodNumber>;
|
|
613
|
+
recallFloor: z.ZodOptional<z.ZodNumber>;
|
|
603
614
|
}, z.core.$strip>;
|
|
604
615
|
namespace: z.ZodString;
|
|
605
616
|
projectRoot: z.ZodOptional<z.ZodString>;
|
|
@@ -629,6 +640,7 @@ declare const factFrontMatterSchema: z.ZodObject<{
|
|
|
629
640
|
predicate: z.ZodString;
|
|
630
641
|
object: z.ZodString;
|
|
631
642
|
propositionKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
643
|
+
idempotencyKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
632
644
|
confidence: z.ZodNumber;
|
|
633
645
|
createdAt: z.ZodPreprocess<z.ZodString, unknown>;
|
|
634
646
|
createdByAgent: z.ZodNullable<z.ZodString>;
|
|
@@ -669,7 +681,7 @@ type FactFile = z.infer<typeof factFrontMatterSchema> & {
|
|
|
669
681
|
content: string;
|
|
670
682
|
path: string;
|
|
671
683
|
};
|
|
672
|
-
type FactFileWrite = Omit<FactFile, "path" | "schemaVersion" | "type" | "category" | "paths" | "severity" | "introducedBy" | "resolvedBy" | "fingerprint" | "sourcePlanId" | "sourceSessionId" | "verification" | "supersededBy" | "sharedWith" | "propositionKey"> & Partial<Pick<FactFile, "category" | "paths" | "severity" | "introducedBy" | "resolvedBy" | "fingerprint" | "sourcePlanId" | "sourceSessionId" | "verification" | "supersededBy" | "sharedWith" | "propositionKey">>;
|
|
684
|
+
type FactFileWrite = Omit<FactFile, "path" | "schemaVersion" | "type" | "category" | "paths" | "severity" | "introducedBy" | "resolvedBy" | "fingerprint" | "sourcePlanId" | "sourceSessionId" | "verification" | "supersededBy" | "sharedWith" | "propositionKey" | "idempotencyKey"> & Partial<Pick<FactFile, "category" | "paths" | "severity" | "introducedBy" | "resolvedBy" | "fingerprint" | "sourcePlanId" | "sourceSessionId" | "verification" | "supersededBy" | "sharedWith" | "propositionKey" | "idempotencyKey">>;
|
|
673
685
|
type IncidentFactFile = FactFile & {
|
|
674
686
|
category: "incident";
|
|
675
687
|
severity: IncidentSeverity;
|
|
@@ -823,6 +835,8 @@ declare class CodeBuddy {
|
|
|
823
835
|
remember(input: RememberInput): Promise<RememberResult>;
|
|
824
836
|
rememberBatch(items: RememberBatchItem[]): Promise<RememberResult[]>;
|
|
825
837
|
recall(input: RecallInput): Promise<RecallResult>;
|
|
838
|
+
/** Cosine floor for an explicit `recall` of the query's embedding model. */
|
|
839
|
+
private recallFloor;
|
|
826
840
|
/**
|
|
827
841
|
* Dense evidence for file facts supplied by the context engine: the cosine of
|
|
828
842
|
* each fact whose stored vector clears the embedding model's calibrated
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
redactLlmKeys,
|
|
3
|
+
resolveLlmConfig
|
|
4
|
+
} from "./chunk-SFMIMLXR.js";
|
|
5
|
+
import "./chunk-KNR2P2UY.js";
|
|
6
|
+
import "./chunk-CG5B3LYG.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
|
+
export {
|
|
9
|
+
redactLlmKeys,
|
|
10
|
+
resolveLlmConfig
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=config-GEZFLXK6.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as CodeBuddyConfig, M as MemoryRepository, b as MemoryFileStore, C as CodeBuddy, N as NamespaceSummary, A as AgentWriteBreakdown, L as ListedFact, c as ModelProvider, d as ContextPolicy, e as PlanInput, P as PlannedContext, E as EmbeddingSpace, f as ProviderDiagnosticsHook, g as EmbeddingRequest, h as EmbeddingResponse, T as TextGenerationRequest, i as TextGenerationResponse } from './codebuddy-
|
|
2
|
-
export { j as CodeBuddyDependencies, k as CodeBuddyStatus, l as ConflictMode, m as EmbeddingWorker, F as FACT_CATEGORIES, n as FactCategory, o as FactFile, p as FactFileWrite, q as ForgetResult, I as INCIDENT_SEVERITIES, r as IncidentFactFile, s as IncidentSeverity, t as MemoryWriteType, u as PlannedMessage, v as PlannerStats, Q as QueryEmbedding, R as RecallInput, w as RecallResult, x as RememberBatchItem, y as RememberInput, z as RememberResult, S as ShareInput, B as ShareResult, D as SkipReason, G as SummaryFile, H as SummaryFileWrite, J as TraceSpan, K as Tracer, U as UnshareInput, O as UnshareResult, W as WorkerConfig, V as WorkerState, X as createTracer, Y as isLangSmithTracingEnabled } from './codebuddy-
|
|
1
|
+
import { a as CodeBuddyConfig, M as MemoryRepository, b as MemoryFileStore, C as CodeBuddy, N as NamespaceSummary, A as AgentWriteBreakdown, L as ListedFact, c as ModelProvider, d as ContextPolicy, e as PlanInput, P as PlannedContext, E as EmbeddingSpace, f as ProviderDiagnosticsHook, g as EmbeddingRequest, h as EmbeddingResponse, T as TextGenerationRequest, i as TextGenerationResponse } from './codebuddy-DO7ZhoWn.js';
|
|
2
|
+
export { j as CodeBuddyDependencies, k as CodeBuddyStatus, l as ConflictMode, m as EmbeddingWorker, F as FACT_CATEGORIES, n as FactCategory, o as FactFile, p as FactFileWrite, q as ForgetResult, I as INCIDENT_SEVERITIES, r as IncidentFactFile, s as IncidentSeverity, t as MemoryWriteType, u as PlannedMessage, v as PlannerStats, Q as QueryEmbedding, R as RecallInput, w as RecallResult, x as RememberBatchItem, y as RememberInput, z as RememberResult, S as ShareInput, B as ShareResult, D as SkipReason, G as SummaryFile, H as SummaryFileWrite, J as TraceSpan, K as Tracer, U as UnshareInput, O as UnshareResult, W as WorkerConfig, V as WorkerState, X as createTracer, Y as isLangSmithTracingEnabled } from './codebuddy-DO7ZhoWn.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as drizzle_orm_postgres_js from 'drizzle-orm/postgres-js';
|
|
5
5
|
import postgres from 'postgres';
|
|
@@ -388,6 +388,8 @@ declare class PlanLifecycle {
|
|
|
388
388
|
complete(id: string, options?: CompleteOptions, now?: string): Promise<PlanSpec>;
|
|
389
389
|
abandon(id: string, options?: AbandonOptions, now?: string): Promise<PlanSpec>;
|
|
390
390
|
amend(id: string, patch: AmendPlanPatch): Promise<PlanSpec>;
|
|
391
|
+
/** Plan paths flow into risk, context and file reads; none may leave the repository. */
|
|
392
|
+
private assertPathsInside;
|
|
391
393
|
current(namespace: string): Promise<PlanSpec | null>;
|
|
392
394
|
private assertTransition;
|
|
393
395
|
private require;
|
|
@@ -907,6 +909,23 @@ declare const facts: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
907
909
|
identity: undefined;
|
|
908
910
|
generated: undefined;
|
|
909
911
|
}, {}, {}>;
|
|
912
|
+
idempotencyKey: drizzle_orm_pg_core.PgColumn<{
|
|
913
|
+
name: "idempotency_key";
|
|
914
|
+
tableName: "facts";
|
|
915
|
+
dataType: "string";
|
|
916
|
+
columnType: "PgText";
|
|
917
|
+
data: string;
|
|
918
|
+
driverParam: string;
|
|
919
|
+
notNull: false;
|
|
920
|
+
hasDefault: false;
|
|
921
|
+
isPrimaryKey: false;
|
|
922
|
+
isAutoincrement: false;
|
|
923
|
+
hasRuntimeDefault: false;
|
|
924
|
+
enumValues: [string, ...string[]];
|
|
925
|
+
baseColumn: never;
|
|
926
|
+
identity: undefined;
|
|
927
|
+
generated: undefined;
|
|
928
|
+
}, {}, {}>;
|
|
910
929
|
content: drizzle_orm_pg_core.PgColumn<{
|
|
911
930
|
name: "content";
|
|
912
931
|
tableName: "facts";
|
|
@@ -2011,7 +2030,7 @@ declare function createPostgresRepository(client: DatabaseClient): MemoryReposit
|
|
|
2011
2030
|
|
|
2012
2031
|
type ModuleNode = {
|
|
2013
2032
|
path: string;
|
|
2014
|
-
language: "ts" | "js";
|
|
2033
|
+
language: "ts" | "js" | "py";
|
|
2015
2034
|
imports: string[];
|
|
2016
2035
|
};
|
|
2017
2036
|
type ModuleEdge = {
|
|
@@ -2100,6 +2119,7 @@ declare const mcpToolInputSchemas: {
|
|
|
2100
2119
|
latest: "latest";
|
|
2101
2120
|
highest_confidence: "highest_confidence";
|
|
2102
2121
|
}>>;
|
|
2122
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
2103
2123
|
}, z.core.$strip>;
|
|
2104
2124
|
readonly list_facts: z.ZodObject<{
|
|
2105
2125
|
subject: z.ZodOptional<z.ZodString>;
|
|
@@ -2336,6 +2356,12 @@ type ModelDefinition = {
|
|
|
2336
2356
|
* `npm run eval:semantic`; cosines are not comparable across models.
|
|
2337
2357
|
*/
|
|
2338
2358
|
relevanceFloor?: number;
|
|
2359
|
+
/**
|
|
2360
|
+
* Floor for an explicit `recall`, where a miss costs more than an extra
|
|
2361
|
+
* fact: best F2 (recall-weighted) on the same calibration set. Without one,
|
|
2362
|
+
* `recall` uses `relevanceFloor`.
|
|
2363
|
+
*/
|
|
2364
|
+
recallFloor?: number;
|
|
2339
2365
|
};
|
|
2340
2366
|
|
|
2341
2367
|
type ResilienceOptions = {
|
|
@@ -2498,11 +2524,28 @@ declare function resolveRiskPaths(input: {
|
|
|
2498
2524
|
useGit?: boolean;
|
|
2499
2525
|
}): Promise<string[]>;
|
|
2500
2526
|
|
|
2527
|
+
/**
|
|
2528
|
+
* `window` (default): commits, authors and reverts in the last `windowDays`.
|
|
2529
|
+
* `lifetime-size`: log-scaled commit count over all history plus log-scaled
|
|
2530
|
+
* line count. On a time-split benchmark (later bug-fix commits) the 30-day
|
|
2531
|
+
* window scored AUC 0.518, lifetime churn 0.791 and line count 0.834
|
|
2532
|
+
* (`scripts/eval-churn-split.mts` reproduces the comparison).
|
|
2533
|
+
*/
|
|
2534
|
+
type ChurnMode = "window" | "lifetime-size";
|
|
2501
2535
|
type ChurnSignalOptions = {
|
|
2502
2536
|
repositoryRoot: string;
|
|
2503
2537
|
enabled?: boolean;
|
|
2504
2538
|
coefficient?: number;
|
|
2539
|
+
/** Explicit git `--since` value; overrides `windowDays`. */
|
|
2505
2540
|
since?: string;
|
|
2541
|
+
/** Window for `window` mode, in days (default 30). */
|
|
2542
|
+
windowDays?: number;
|
|
2543
|
+
mode?: ChurnMode;
|
|
2544
|
+
/**
|
|
2545
|
+
* Score as of this date: only commits before it, and (lifetime-size) file
|
|
2546
|
+
* sizes at the last such commit. For time-split evaluation; default now.
|
|
2547
|
+
*/
|
|
2548
|
+
asOf?: string | Date;
|
|
2506
2549
|
};
|
|
2507
2550
|
declare function createChurnSignal(options: ChurnSignalOptions): Signal;
|
|
2508
2551
|
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,8 @@ import {
|
|
|
3
3
|
migrateMemoryToFiles,
|
|
4
4
|
registerCodeBuddyTools,
|
|
5
5
|
startMcpServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6DONJW3W.js";
|
|
7
|
+
import "./chunk-GXOML4UZ.js";
|
|
7
8
|
import {
|
|
8
9
|
ACTIVE_PLAN_STATUSES,
|
|
9
10
|
ActivePlanExistsError,
|
|
@@ -21,15 +22,11 @@ import {
|
|
|
21
22
|
createPolicySignal,
|
|
22
23
|
readPolicyFile,
|
|
23
24
|
resolveRiskPaths
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
neighbours,
|
|
30
|
-
queryMap
|
|
31
|
-
} from "./chunk-NERKZSSE.js";
|
|
32
|
-
import "./chunk-PQK3GKZH.js";
|
|
25
|
+
} from "./chunk-ZNLSCV3J.js";
|
|
26
|
+
import "./chunk-GKNYMNFM.js";
|
|
27
|
+
import "./chunk-XL2HLACE.js";
|
|
28
|
+
import "./chunk-TGFTKWOR.js";
|
|
29
|
+
import "./chunk-DFV2SK6C.js";
|
|
33
30
|
import {
|
|
34
31
|
CodeBuddy,
|
|
35
32
|
DefaultPolicy,
|
|
@@ -44,23 +41,29 @@ import {
|
|
|
44
41
|
isLangSmithTracingEnabled,
|
|
45
42
|
listFactsPage,
|
|
46
43
|
runDoctor
|
|
47
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-NY2YXP3R.js";
|
|
48
45
|
import {
|
|
49
46
|
FACT_CATEGORIES,
|
|
50
47
|
INCIDENT_SEVERITIES,
|
|
51
48
|
MemoryFileStore
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-GDJH7XJC.js";
|
|
49
|
+
} from "./chunk-6KGYAFG7.js";
|
|
54
50
|
import {
|
|
55
51
|
clampBudgetForCallerModel,
|
|
56
52
|
countTokens
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-CAEPHLHC.js";
|
|
54
|
+
import "./chunk-6JCKMIQY.js";
|
|
59
55
|
import {
|
|
60
56
|
LocalModelProvider
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import
|
|
57
|
+
} from "./chunk-3QGW53GD.js";
|
|
58
|
+
import "./chunk-TLWGZVPC.js";
|
|
59
|
+
import {
|
|
60
|
+
buildArchitectureMap,
|
|
61
|
+
neighbours,
|
|
62
|
+
queryMap
|
|
63
|
+
} from "./chunk-ITQO632W.js";
|
|
64
|
+
import "./chunk-Y7D7PUBE.js";
|
|
65
|
+
import "./chunk-AL6VBTNA.js";
|
|
66
|
+
import "./chunk-HPOR6YXA.js";
|
|
64
67
|
import {
|
|
65
68
|
PLAN_POLICIES,
|
|
66
69
|
checkConfigPermissions,
|
|
@@ -71,7 +74,8 @@ import {
|
|
|
71
74
|
loadRuntimeConfig,
|
|
72
75
|
redactSecrets,
|
|
73
76
|
setPlanPolicy
|
|
74
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-KNR2P2UY.js";
|
|
78
|
+
import "./chunk-CG5B3LYG.js";
|
|
75
79
|
import "./chunk-PZ5AY32C.js";
|
|
76
80
|
export {
|
|
77
81
|
ACTIVE_PLAN_STATUSES,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
detectClient,
|
|
3
|
+
installClient,
|
|
4
|
+
setHooks,
|
|
5
|
+
uninstallClient
|
|
6
|
+
} from "./chunk-J4T6HHI4.js";
|
|
7
|
+
import "./chunk-W7GAXL6C.js";
|
|
8
|
+
import "./chunk-ITQO632W.js";
|
|
9
|
+
import "./chunk-Y7D7PUBE.js";
|
|
10
|
+
import "./chunk-KNR2P2UY.js";
|
|
11
|
+
import "./chunk-CG5B3LYG.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
13
|
+
export {
|
|
14
|
+
detectClient,
|
|
15
|
+
installClient,
|
|
16
|
+
setHooks,
|
|
17
|
+
uninstallClient
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=install-BXM56QCD.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runLeanHookCommand
|
|
3
|
+
} from "./chunk-UK6XTS2Y.js";
|
|
4
|
+
import "./chunk-FJOTP632.js";
|
|
5
|
+
import "./chunk-GKNYMNFM.js";
|
|
6
|
+
import "./chunk-TGFTKWOR.js";
|
|
7
|
+
import "./chunk-CAEPHLHC.js";
|
|
8
|
+
import "./chunk-TLWGZVPC.js";
|
|
9
|
+
import "./chunk-ITQO632W.js";
|
|
10
|
+
import "./chunk-Y7D7PUBE.js";
|
|
11
|
+
import "./chunk-AL6VBTNA.js";
|
|
12
|
+
import "./chunk-HPOR6YXA.js";
|
|
13
|
+
import "./chunk-KNR2P2UY.js";
|
|
14
|
+
import "./chunk-CG5B3LYG.js";
|
|
15
|
+
import "./chunk-PZ5AY32C.js";
|
|
16
|
+
export {
|
|
17
|
+
runLeanHookCommand
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=lean-command-7DFW32MA.js.map
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
localRuntimeInstalled,
|
|
5
5
|
modelCacheDir,
|
|
6
6
|
rerankLocally
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-3QGW53GD.js";
|
|
8
|
+
import "./chunk-HPOR6YXA.js";
|
|
9
9
|
import "./chunk-PZ5AY32C.js";
|
|
10
10
|
export {
|
|
11
11
|
LocalModelProvider,
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
modelCacheDir,
|
|
15
15
|
rerankLocally
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=local-
|
|
17
|
+
//# sourceMappingURL=local-ST4WMRCG.js.map
|