@loreai/core 0.16.0 → 0.17.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/README.md +11 -0
- package/dist/bun/agents-file.d.ts +13 -1
- package/dist/bun/agents-file.d.ts.map +1 -1
- package/dist/bun/config.d.ts +20 -1
- package/dist/bun/config.d.ts.map +1 -1
- package/dist/bun/data.d.ts +174 -0
- package/dist/bun/data.d.ts.map +1 -0
- package/dist/bun/db.d.ts +65 -0
- package/dist/bun/db.d.ts.map +1 -1
- package/dist/bun/distillation.d.ts +49 -6
- package/dist/bun/distillation.d.ts.map +1 -1
- package/dist/bun/embedding-vendor.d.ts +66 -0
- package/dist/bun/embedding-vendor.d.ts.map +1 -0
- package/dist/bun/embedding-worker-types.d.ts +66 -0
- package/dist/bun/embedding-worker-types.d.ts.map +1 -0
- package/dist/bun/embedding-worker.d.ts +16 -0
- package/dist/bun/embedding-worker.d.ts.map +1 -0
- package/dist/bun/embedding-worker.js +100 -0
- package/dist/bun/embedding-worker.js.map +7 -0
- package/dist/bun/embedding.d.ts +91 -8
- package/dist/bun/embedding.d.ts.map +1 -1
- package/dist/bun/git.d.ts +47 -0
- package/dist/bun/git.d.ts.map +1 -0
- package/dist/bun/gradient.d.ts +19 -1
- package/dist/bun/gradient.d.ts.map +1 -1
- package/dist/bun/index.d.ts +9 -6
- package/dist/bun/index.d.ts.map +1 -1
- package/dist/bun/index.js +13029 -10885
- package/dist/bun/index.js.map +4 -4
- package/dist/bun/lat-reader.d.ts +1 -1
- package/dist/bun/lat-reader.d.ts.map +1 -1
- package/dist/bun/ltm.d.ts.map +1 -1
- package/dist/bun/markdown.d.ts +11 -0
- package/dist/bun/markdown.d.ts.map +1 -1
- package/dist/bun/prompt.d.ts +1 -1
- package/dist/bun/prompt.d.ts.map +1 -1
- package/dist/bun/recall.d.ts +53 -0
- package/dist/bun/recall.d.ts.map +1 -1
- package/dist/bun/search.d.ts +29 -0
- package/dist/bun/search.d.ts.map +1 -1
- package/dist/bun/temporal.d.ts +2 -0
- package/dist/bun/temporal.d.ts.map +1 -1
- package/dist/bun/types.d.ts +15 -0
- package/dist/bun/types.d.ts.map +1 -1
- package/dist/bun/worker-model.d.ts +12 -9
- package/dist/bun/worker-model.d.ts.map +1 -1
- package/dist/node/agents-file.d.ts +13 -1
- package/dist/node/agents-file.d.ts.map +1 -1
- package/dist/node/config.d.ts +20 -1
- package/dist/node/config.d.ts.map +1 -1
- package/dist/node/data.d.ts +174 -0
- package/dist/node/data.d.ts.map +1 -0
- package/dist/node/db.d.ts +65 -0
- package/dist/node/db.d.ts.map +1 -1
- package/dist/node/distillation.d.ts +49 -6
- package/dist/node/distillation.d.ts.map +1 -1
- package/dist/node/embedding-vendor.d.ts +66 -0
- package/dist/node/embedding-vendor.d.ts.map +1 -0
- package/dist/node/embedding-worker-types.d.ts +66 -0
- package/dist/node/embedding-worker-types.d.ts.map +1 -0
- package/dist/node/embedding-worker.d.ts +16 -0
- package/dist/node/embedding-worker.d.ts.map +1 -0
- package/dist/node/embedding-worker.js +100 -0
- package/dist/node/embedding-worker.js.map +7 -0
- package/dist/node/embedding.d.ts +91 -8
- package/dist/node/embedding.d.ts.map +1 -1
- package/dist/node/git.d.ts +47 -0
- package/dist/node/git.d.ts.map +1 -0
- package/dist/node/gradient.d.ts +19 -1
- package/dist/node/gradient.d.ts.map +1 -1
- package/dist/node/index.d.ts +9 -6
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +13029 -10885
- package/dist/node/index.js.map +4 -4
- package/dist/node/lat-reader.d.ts +1 -1
- package/dist/node/lat-reader.d.ts.map +1 -1
- package/dist/node/ltm.d.ts.map +1 -1
- package/dist/node/markdown.d.ts +11 -0
- package/dist/node/markdown.d.ts.map +1 -1
- package/dist/node/prompt.d.ts +1 -1
- package/dist/node/prompt.d.ts.map +1 -1
- package/dist/node/recall.d.ts +53 -0
- package/dist/node/recall.d.ts.map +1 -1
- package/dist/node/search.d.ts +29 -0
- package/dist/node/search.d.ts.map +1 -1
- package/dist/node/temporal.d.ts +2 -0
- package/dist/node/temporal.d.ts.map +1 -1
- package/dist/node/types.d.ts +15 -0
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/worker-model.d.ts +12 -9
- package/dist/node/worker-model.d.ts.map +1 -1
- package/dist/types/agents-file.d.ts +13 -1
- package/dist/types/agents-file.d.ts.map +1 -1
- package/dist/types/config.d.ts +20 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/data.d.ts +174 -0
- package/dist/types/data.d.ts.map +1 -0
- package/dist/types/db.d.ts +65 -0
- package/dist/types/db.d.ts.map +1 -1
- package/dist/types/distillation.d.ts +49 -6
- package/dist/types/distillation.d.ts.map +1 -1
- package/dist/types/embedding-vendor.d.ts +66 -0
- package/dist/types/embedding-vendor.d.ts.map +1 -0
- package/dist/types/embedding-worker-types.d.ts +66 -0
- package/dist/types/embedding-worker-types.d.ts.map +1 -0
- package/dist/types/embedding-worker.d.ts +16 -0
- package/dist/types/embedding-worker.d.ts.map +1 -0
- package/dist/types/embedding.d.ts +91 -8
- package/dist/types/embedding.d.ts.map +1 -1
- package/dist/types/git.d.ts +47 -0
- package/dist/types/git.d.ts.map +1 -0
- package/dist/types/gradient.d.ts +19 -1
- package/dist/types/gradient.d.ts.map +1 -1
- package/dist/types/index.d.ts +9 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lat-reader.d.ts +1 -1
- package/dist/types/lat-reader.d.ts.map +1 -1
- package/dist/types/ltm.d.ts.map +1 -1
- package/dist/types/markdown.d.ts +11 -0
- package/dist/types/markdown.d.ts.map +1 -1
- package/dist/types/prompt.d.ts +1 -1
- package/dist/types/prompt.d.ts.map +1 -1
- package/dist/types/recall.d.ts +53 -0
- package/dist/types/recall.d.ts.map +1 -1
- package/dist/types/search.d.ts +29 -0
- package/dist/types/search.d.ts.map +1 -1
- package/dist/types/temporal.d.ts +2 -0
- package/dist/types/temporal.d.ts.map +1 -1
- package/dist/types/types.d.ts +15 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/worker-model.d.ts +12 -9
- package/dist/types/worker-model.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/agents-file.ts +87 -4
- package/src/config.ts +68 -5
- package/src/curator.ts +2 -2
- package/src/data.ts +768 -0
- package/src/db.ts +386 -7
- package/src/distillation.ts +178 -35
- package/src/embedding-vendor.ts +102 -0
- package/src/embedding-worker-types.ts +82 -0
- package/src/embedding-worker.ts +185 -0
- package/src/embedding.ts +607 -61
- package/src/git.ts +144 -0
- package/src/gradient.ts +174 -17
- package/src/index.ts +20 -0
- package/src/lat-reader.ts +5 -11
- package/src/ltm.ts +17 -44
- package/src/markdown.ts +15 -0
- package/src/prompt.ts +1 -2
- package/src/recall.ts +401 -70
- package/src/search.ts +71 -1
- package/src/temporal.ts +42 -35
- package/src/types.ts +15 -0
- package/src/worker-model.ts +14 -9
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git.ts — Git repository identification utilities.
|
|
3
|
+
*
|
|
4
|
+
* Extracts and normalizes git remote URLs to identify projects by their
|
|
5
|
+
* repository identity rather than filesystem path. This enables:
|
|
6
|
+
* - Worktree awareness: main checkout and worktrees share one project
|
|
7
|
+
* - Clone deduplication: same repo cloned to different paths is one project
|
|
8
|
+
* - Fork awareness: prefers `upstream` remote to unify forks with their source
|
|
9
|
+
*
|
|
10
|
+
* Remote URL normalization strips protocol, auth, and `.git` suffix to produce
|
|
11
|
+
* a stable canonical identifier (e.g. "github.com/user/repo") regardless of
|
|
12
|
+
* how the remote was configured (SSH, HTTPS, git://).
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Normalize a git remote URL to a canonical form for comparison.
|
|
16
|
+
*
|
|
17
|
+
* Strips protocol, auth, `.git` suffix, and normalizes SSH ↔ HTTPS
|
|
18
|
+
* to produce a stable identifier regardless of how the remote was
|
|
19
|
+
* configured.
|
|
20
|
+
*
|
|
21
|
+
* Examples:
|
|
22
|
+
* git@github.com:user/repo.git → github.com/user/repo
|
|
23
|
+
* https://github.com/user/repo.git → github.com/user/repo
|
|
24
|
+
* ssh://git@github.com/user/repo → github.com/user/repo
|
|
25
|
+
* git://github.com/user/repo.git → github.com/user/repo
|
|
26
|
+
* https://user:token@github.com/user/repo → github.com/user/repo
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeRemoteUrl(url: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Clear the in-memory git remote cache.
|
|
31
|
+
*
|
|
32
|
+
* Intended for test harnesses that need deterministic behavior across
|
|
33
|
+
* test cases without leaking cached results.
|
|
34
|
+
*/
|
|
35
|
+
export declare function clearGitRemoteCache(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get the canonical git remote URL for a repository at the given path.
|
|
38
|
+
*
|
|
39
|
+
* Prefers `upstream` remote (for forks) over `origin`, then falls back
|
|
40
|
+
* to any other remote. Returns null if the path is not in a git repo
|
|
41
|
+
* or has no remotes configured.
|
|
42
|
+
*
|
|
43
|
+
* Results are cached in-memory for the process lifetime to avoid repeated
|
|
44
|
+
* subprocess calls — `git remote -v` only runs once per unique path.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getGitRemote(path: string): string | null;
|
|
47
|
+
//# sourceMappingURL=git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/git.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA6BtD;AAaD;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA+CxD"}
|
package/dist/node/gradient.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import type { LoreMessageWithParts } from "./types";
|
|
2
2
|
type MessageWithParts = LoreMessageWithParts;
|
|
3
|
+
/** Compute the context ceiling from a per-bust cost target and cache-write price per token. */
|
|
4
|
+
export declare function computeContextCap(targetBustCost: number, cacheWriteCostPerToken: number): number;
|
|
5
|
+
/** Set the static context ceiling. Called by the host adapter after computing
|
|
6
|
+
* from model pricing. The effective per-session cap may be lower due to
|
|
7
|
+
* dynamic adaptation (bust rate EMA). */
|
|
8
|
+
export declare function setMaxContextTokens(tokens: number): void;
|
|
9
|
+
/** Returns the current static ceiling (for external callers / tests). */
|
|
10
|
+
export declare function getMaxContextTokens(): number;
|
|
11
|
+
/**
|
|
12
|
+
* Feed cache usage data after each API response. Updates the per-session
|
|
13
|
+
* bust rate EMA and inter-bust interval, which adjust the effective context
|
|
14
|
+
* cap dynamically.
|
|
15
|
+
*
|
|
16
|
+
* @param cacheWrite - cache_creation_input_tokens from the API response
|
|
17
|
+
* @param cacheRead - cache_read_input_tokens from the API response
|
|
18
|
+
* @param sessionID - session that produced this response
|
|
19
|
+
*/
|
|
20
|
+
export declare function updateBustRate(cacheWrite: number, cacheRead: number, sessionID?: string): void;
|
|
3
21
|
type DistillationSnapshot = {
|
|
4
22
|
/** Cached distillation rows from the most recent DB read */
|
|
5
23
|
rows: Distillation[];
|
|
@@ -182,7 +200,7 @@ export type TransformResult = {
|
|
|
182
200
|
distilledBudget: number;
|
|
183
201
|
rawBudget: number;
|
|
184
202
|
};
|
|
185
|
-
export declare function needsUrgentDistillation(): boolean;
|
|
203
|
+
export declare function needsUrgentDistillation(sessionID: string): boolean;
|
|
186
204
|
export declare function transform(input: {
|
|
187
205
|
messages: MessageWithParts[];
|
|
188
206
|
projectPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/gradient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,oBAAoB,EAAqE,MAAM,SAAS,CAAC;AAQ9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,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,EAAE,WAAW,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAMF,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAIlE;AAmVD,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAC/B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,eAAe,CAwClB;AAGD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAErE"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
export * as temporal from "./temporal";
|
|
2
2
|
export * as ltm from "./ltm";
|
|
3
|
+
export * as data from "./data";
|
|
3
4
|
export * as distillation from "./distillation";
|
|
4
5
|
export * as curator from "./curator";
|
|
5
6
|
export * as embedding from "./embedding";
|
|
7
|
+
export * as embeddingVendor from "./embedding-vendor";
|
|
6
8
|
export * as latReader from "./lat-reader";
|
|
7
9
|
export * as patternExtract from "./pattern-extract";
|
|
8
10
|
export * as log from "./log";
|
|
9
|
-
export { runRecall, RECALL_TOOL_DESCRIPTION, RECALL_PARAM_DESCRIPTIONS, type RecallInput, type RecallResult, type RecallScope, type ScoredDistillation, } from "./recall";
|
|
11
|
+
export { runRecall, searchRecall, recallById, RECALL_TOOL_DESCRIPTION, RECALL_PARAM_DESCRIPTIONS, type RecallInput, type RecallResult, type RecallScope, type ScoredDistillation, type TaggedResult, type ScoredTaggedResult, } from "./recall";
|
|
10
12
|
export type { LoreMessage, LoreUserMessage, LoreAssistantMessage, LorePart, LoreTextPart, LoreReasoningPart, LoreToolPart, LoreGenericPart, LoreToolState, LoreToolStatePending, LoreToolStateRunning, LoreToolStateCompleted, LoreToolStateError, LoreMessageWithParts, LLMClient, } from "./types";
|
|
11
13
|
export { isTextPart, isReasoningPart, isToolPart } from "./types";
|
|
12
14
|
export { load, config, type LoreConfig } from "./config";
|
|
13
|
-
export { db, ensureProject, isFirstRun, projectId, projectName, loadForceMinLayer, saveForceMinLayer, getMeta, setMeta, getInstanceId, close, } from "./db";
|
|
14
|
-
export {
|
|
15
|
+
export { db, dbPath, ensureProject, isFirstRun, projectId, projectName, mergeProjectInternal, loadForceMinLayer, saveForceMinLayer, saveSessionCosts, loadSessionCosts, loadAllSessionCosts, type SessionCostSnapshot, getMeta, setMeta, getInstanceId, close, } from "./db";
|
|
16
|
+
export { normalizeRemoteUrl, getGitRemote, clearGitRemoteCache } from "./git";
|
|
17
|
+
export { transform, setModelLimits, setMaxLayer0Tokens, computeLayer0Cap, setMaxContextTokens, computeContextCap, getMaxContextTokens, updateBustRate, needsUrgentDistillation, calibrate, setLtmTokens, getLtmTokens, getLtmBudget, setForceMinLayer, getLastTransformedCount, getLastTransformEstimate, toolStripAnnotation, onIdleResume, getLastTurnAt, consumeCameOutOfIdle, setLastTurnAtForTest, inspectSessionState, } from "./gradient";
|
|
15
18
|
export { formatKnowledge, formatDistillations, DISTILLATION_SYSTEM, distillationUser, RECURSIVE_SYSTEM, recursiveUser, CURATOR_SYSTEM, curatorUser, CONSOLIDATION_SYSTEM, consolidationUser, QUERY_EXPANSION_SYSTEM, COMPACT_SUMMARY_TEMPLATE, buildCompactPrompt, } from "./prompt";
|
|
16
|
-
export { shouldImport, importFromFile, exportToFile, exportLoreFile, importLoreFile, shouldImportLoreFile, loreFileExists, LORE_FILE, } from "./agents-file";
|
|
19
|
+
export { shouldImport, importFromFile, exportToFile, exportLoreFile, importLoreFile, shouldImportLoreFile, loreFileExists, clearLoreFileCache, LORE_FILE, } from "./agents-file";
|
|
17
20
|
export { workerSessionIDs, isWorkerSession } from "./worker";
|
|
18
21
|
export * as workerModel from "./worker-model";
|
|
19
|
-
export { ftsQuery, ftsQueryOr, EMPTY_QUERY, reciprocalRankFusion, expandQuery, extractTopTerms, exactTermMatchRank, } from "./search";
|
|
20
|
-
export { serialize, inline, h, p, ul, lip, liph, t, root, strong, normalize, sanitizeSurrogates, unescapeMarkdown, } from "./markdown";
|
|
22
|
+
export { ftsQuery, ftsQueryOr, ftsQueryRelaxed, EMPTY_QUERY, reciprocalRankFusion, expandQuery, extractTopTerms, exactTermMatchRank, } from "./search";
|
|
23
|
+
export { serialize, inline, h, p, ul, lip, liph, t, root, strong, normalize, sanitizeSurrogates, unescapeMarkdown, renderMarkdown, } from "./markdown";
|
|
21
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAE7B,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,yBAAyB,EACzB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,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