@cortexkit/magic-context 0.28.0 → 0.29.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/index.js +16 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13647,6 +13647,12 @@ var init_read_session_db = __esm(async () => {
|
|
|
13647
13647
|
await init_sqlite();
|
|
13648
13648
|
});
|
|
13649
13649
|
|
|
13650
|
+
// ../plugin/src/shared/commit-detection.ts
|
|
13651
|
+
var HASH_HEX = "[0-9a-f]{7,12}", COMMIT_HASH_TEST_PATTERN;
|
|
13652
|
+
var init_commit_detection = __esm(() => {
|
|
13653
|
+
COMMIT_HASH_TEST_PATTERN = new RegExp(`\\b${HASH_HEX}\\b`, "i");
|
|
13654
|
+
});
|
|
13655
|
+
|
|
13650
13656
|
// ../../node_modules/.bun/ai-tokenizer@1.0.6/node_modules/ai-tokenizer/dist/index.js
|
|
13651
13657
|
function _typeof(o) {
|
|
13652
13658
|
"@babel/helpers - typeof";
|
|
@@ -146097,6 +146103,7 @@ var init_claude = __esm(() => {
|
|
|
146097
146103
|
// ../plugin/src/hooks/magic-context/read-session-formatting.ts
|
|
146098
146104
|
var tokenizer;
|
|
146099
146105
|
var init_read_session_formatting = __esm(() => {
|
|
146106
|
+
init_commit_detection();
|
|
146100
146107
|
init_dist5();
|
|
146101
146108
|
init_claude();
|
|
146102
146109
|
tokenizer = new src_default(exports_claude);
|
|
@@ -146132,6 +146139,13 @@ function isRecord2(value) {
|
|
|
146132
146139
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
146133
146140
|
}
|
|
146134
146141
|
|
|
146142
|
+
// ../plugin/src/hooks/magic-context/edit-marker.ts
|
|
146143
|
+
var PATH_KEYS, DIFF_KEYS;
|
|
146144
|
+
var init_edit_marker = __esm(() => {
|
|
146145
|
+
PATH_KEYS = new Set(["filePath", "file_path", "path"]);
|
|
146146
|
+
DIFF_KEYS = new Set(["oldString", "newString", "content", "old_string", "new_string"]);
|
|
146147
|
+
});
|
|
146148
|
+
|
|
146135
146149
|
// ../plugin/src/hooks/magic-context/tool-drop-target.ts
|
|
146136
146150
|
function hasMeaningfulPart(part) {
|
|
146137
146151
|
if (!isRecord2(part))
|
|
@@ -146177,6 +146191,7 @@ class ToolMutationBatch {
|
|
|
146177
146191
|
}
|
|
146178
146192
|
var IGNORE_PART_TYPES;
|
|
146179
146193
|
var init_tool_drop_target = __esm(() => {
|
|
146194
|
+
init_edit_marker();
|
|
146180
146195
|
init_tag_content_primitives();
|
|
146181
146196
|
IGNORE_PART_TYPES = new Set([
|
|
146182
146197
|
"thinking",
|
|
@@ -164945,6 +164960,7 @@ var init_magic_context = __esm(() => {
|
|
|
164945
164960
|
}).describe("Embedding provider configuration"),
|
|
164946
164961
|
temporal_awareness: exports_external.boolean().default(true).describe('Inject wall-clock gap markers (<!-- +Xm -->) between user messages where > 5 min elapsed since the previous message, and add start/end date attributes on compartments. Gives the agent a sense of session pacing and "how long ago" across multi-day sessions. Graduated from experimental.temporal_awareness; default: true (set false to opt out).'),
|
|
164947
164962
|
keep_subagents: exports_external.boolean().default(false).describe("Debug: keep the child sessions Magic Context spawns for its own subagents (historian, dreamer, sidekick, memory-migration) instead of deleting them on success. Useful for short-term inspection/data collection — their full transcript (prompt, tool calls, token usage, output) stays in the host session store. Kept sessions accumulate until manually cleared; leave false for normal use. Requires a restart to take effect."),
|
|
164963
|
+
smart_drops: exports_external.boolean().default(false).describe("Content-aware reclaim of provably-superseded tool output, layered on the existing execute-pass auto-drop. When on: superseded todowrite (keep newest 1), spent ctx_reduce (keep newest 5), and zero-value meta (bash_status, bash_kill, ctx_note read/dismiss) outputs are dropped; older edits to a file are compressed to a filePath-preserving marker while the newest edit per file stays full. Only acts on passes already busting the cache, so it never originates a cache bust. Honors the protected-tag reserve. Experimental: opt-in, default off until cache stability is proven; when off the wire is byte-identical to the positional-only reclaim. Requires a restart."),
|
|
164948
164964
|
caveman_text_compression: exports_external.object({
|
|
164949
164965
|
enabled: exports_external.boolean().default(false).describe("Apply deterministic caveman-style text compression to old conversation text. Only active when ctx_reduce_enabled=false. Compresses user/assistant text in oldest-first tiers: ultra (oldest 20%), full, lite, untouched (newest 40%)."),
|
|
164950
164966
|
min_chars: exports_external.number().min(100).max(1e4).default(500).describe("Text parts shorter than this (characters) stay untouched. Min 100, max 10000. Default: 500.")
|