@cortexkit/opencode-magic-context 0.11.1 → 0.13.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 +3 -1
- package/dist/agents/historian.d.ts +1 -0
- package/dist/agents/historian.d.ts.map +1 -1
- package/dist/agents/magic-context-prompt.d.ts +1 -1
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli.js +362 -83
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +117 -2
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/config/variable.d.ts +46 -0
- package/dist/config/variable.d.ts.map +1 -0
- package/dist/features/magic-context/compartment-storage.d.ts +27 -1
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/compression-depth-storage.d.ts +7 -0
- package/dist/features/magic-context/compression-depth-storage.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-probe.d.ts +69 -0
- package/dist/features/magic-context/memory/embedding-probe.d.ts.map +1 -0
- package/dist/features/magic-context/scheduler.d.ts +5 -1
- package/dist/features/magic-context/scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/caveman.d.ts +35 -0
- package/dist/hooks/magic-context/caveman.d.ts.map +1 -0
- package/dist/hooks/magic-context/command-handler.d.ts +29 -1
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts +8 -3
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-compressor.d.ts +46 -0
- package/dist/hooks/magic-context/compartment-runner-compressor.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +10 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts +29 -0
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +9 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +5 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts +31 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts +4 -0
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts +39 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +4 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +13 -4
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +11 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +13 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +7 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +2 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/temporal-awareness.d.ts +73 -0
- package/dist/hooks/magic-context/temporal-awareness.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +10 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +18 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2562 -1086
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/shared/model-requirements.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +11 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/model-requirements.ts +3 -1
- package/src/shared/models-dev-cache.ts +11 -1
- package/src/shared/rpc-types.ts +11 -0
- package/src/tui/data/context-db.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,wBAAwB,CAAC;AAG3F,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAChE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CACZ,MAAM,EACN;QACI,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CACJ,CAAC;CACL;AAoLD,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,MAAM,GAClB,wBAAwB,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAuC1D"}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { AgentOverrideConfigSchema } from "./agent-overrides";
|
|
3
2
|
export declare const DEFAULT_NUDGE_INTERVAL_TOKENS = 10000;
|
|
4
3
|
export declare const DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE = 65;
|
|
5
4
|
export declare const DEFAULT_HISTORIAN_TIMEOUT_MS = 300000;
|
|
6
5
|
export declare const DEFAULT_HISTORY_BUDGET_PERCENTAGE = 0.15;
|
|
7
6
|
export declare const DEFAULT_LOCAL_EMBEDDING_MODEL = "Xenova/all-MiniLM-L6-v2";
|
|
7
|
+
/** Compressor defaults — see CompressorConfigSchema below for details. */
|
|
8
|
+
export declare const DEFAULT_COMPRESSOR_MIN_COMPARTMENT_RATIO = 1000;
|
|
9
|
+
export declare const DEFAULT_COMPRESSOR_MAX_MERGE_DEPTH = 5;
|
|
10
|
+
export declare const DEFAULT_COMPRESSOR_COOLDOWN_MS = 600000;
|
|
11
|
+
/** Max compartments merged in one LLM pass. LLM quality degrades with larger inputs,
|
|
12
|
+
* and smaller batches reduce ordinal-drift risk when the model outputs merged boundaries. */
|
|
13
|
+
export declare const DEFAULT_COMPRESSOR_MAX_COMPARTMENTS_PER_PASS = 15;
|
|
14
|
+
/** Number of newest compartments always excluded from compression.
|
|
15
|
+
* Protects freshly-published historian compartments from immediate re-compression,
|
|
16
|
+
* which would lose narrative quality before the agent has even used the compartment. */
|
|
17
|
+
export declare const DEFAULT_COMPRESSOR_GRACE_COMPARTMENTS = 10;
|
|
18
|
+
/** Output count at each depth = ceil(input / ratio).
|
|
19
|
+
* Lower ratios = gentler compression. Depth 5 is title-only (no LLM call). */
|
|
20
|
+
export declare const COMPRESSOR_MERGE_RATIO_BY_DEPTH: Record<number, number>;
|
|
8
21
|
export declare const DREAMER_TASKS: readonly ["consolidate", "verify", "archive-stale", "improve", "maintain-docs"];
|
|
9
22
|
export declare const DreamingTaskSchema: z.ZodEnum<{
|
|
10
23
|
consolidate: "consolidate";
|
|
@@ -133,6 +146,63 @@ export declare const SidekickConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
133
146
|
system_prompt: z.ZodOptional<z.ZodString>;
|
|
134
147
|
}, z.core.$strip>>;
|
|
135
148
|
export type SidekickConfig = NonNullable<z.infer<typeof SidekickConfigSchema>>;
|
|
149
|
+
/** Historian agent configuration — includes all agent overrides plus two_pass mode.
|
|
150
|
+
* Two-pass mode runs a second editor pass after the initial historian pass to clean
|
|
151
|
+
* up low-signal U: lines and cross-compartment duplicates. Recommended for models
|
|
152
|
+
* without extended thinking; not needed for Claude Sonnet/Opus when reasoning is
|
|
153
|
+
* enabled via OpenCode variant config. */
|
|
154
|
+
export declare const HistorianConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
model: z.ZodOptional<z.ZodString>;
|
|
156
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
159
|
+
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
160
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
+
description: z.ZodOptional<z.ZodString>;
|
|
162
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
163
|
+
subagent: "subagent";
|
|
164
|
+
primary: "primary";
|
|
165
|
+
all: "all";
|
|
166
|
+
}>>;
|
|
167
|
+
color: z.ZodOptional<z.ZodString>;
|
|
168
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
permission: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
edit: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
ask: "ask";
|
|
172
|
+
allow: "allow";
|
|
173
|
+
deny: "deny";
|
|
174
|
+
}>>;
|
|
175
|
+
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
176
|
+
ask: "ask";
|
|
177
|
+
allow: "allow";
|
|
178
|
+
deny: "deny";
|
|
179
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
180
|
+
ask: "ask";
|
|
181
|
+
allow: "allow";
|
|
182
|
+
deny: "deny";
|
|
183
|
+
}>>]>>;
|
|
184
|
+
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
ask: "ask";
|
|
186
|
+
allow: "allow";
|
|
187
|
+
deny: "deny";
|
|
188
|
+
}>>;
|
|
189
|
+
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
190
|
+
ask: "ask";
|
|
191
|
+
allow: "allow";
|
|
192
|
+
deny: "deny";
|
|
193
|
+
}>>;
|
|
194
|
+
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
ask: "ask";
|
|
196
|
+
allow: "allow";
|
|
197
|
+
deny: "deny";
|
|
198
|
+
}>>;
|
|
199
|
+
}, z.core.$strip>>;
|
|
200
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
202
|
+
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
203
|
+
two_pass: z.ZodDefault<z.ZodBoolean>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
export type HistorianConfig = NonNullable<z.infer<typeof HistorianConfigSchema>>;
|
|
136
206
|
export declare const EmbeddingConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
137
207
|
provider: z.ZodDefault<z.ZodEnum<{
|
|
138
208
|
local: "local";
|
|
@@ -166,7 +236,7 @@ export interface MagicContextConfig {
|
|
|
166
236
|
* and prompt guidance about ctx_reduce is stripped. Heuristic cleanup,
|
|
167
237
|
* compartments, memory, and other features continue to work. Default: true. */
|
|
168
238
|
ctx_reduce_enabled: boolean;
|
|
169
|
-
historian?:
|
|
239
|
+
historian?: HistorianConfig;
|
|
170
240
|
dreamer?: DreamerConfig;
|
|
171
241
|
cache_ttl: string | {
|
|
172
242
|
default: string;
|
|
@@ -177,6 +247,13 @@ export interface MagicContextConfig {
|
|
|
177
247
|
default: number;
|
|
178
248
|
[modelKey: string]: number;
|
|
179
249
|
};
|
|
250
|
+
/** Absolute token thresholds per model. When set for a given model (or via `default`),
|
|
251
|
+
* this overrides `execute_threshold_percentage` for that model. Useful for hard caps
|
|
252
|
+
* matching provider input limits. Values above 80% × context_limit are clamped with a warning. */
|
|
253
|
+
execute_threshold_tokens?: {
|
|
254
|
+
default?: number;
|
|
255
|
+
[modelKey: string]: number | undefined;
|
|
256
|
+
};
|
|
180
257
|
protected_tags: number;
|
|
181
258
|
auto_drop_tool_age: number;
|
|
182
259
|
drop_tool_structure: boolean;
|
|
@@ -189,6 +266,14 @@ export interface MagicContextConfig {
|
|
|
189
266
|
min_clusters: number;
|
|
190
267
|
};
|
|
191
268
|
compaction_markers: boolean;
|
|
269
|
+
compressor: {
|
|
270
|
+
enabled: boolean;
|
|
271
|
+
min_compartment_ratio: number;
|
|
272
|
+
max_merge_depth: number;
|
|
273
|
+
cooldown_ms: number;
|
|
274
|
+
max_compartments_per_pass: number;
|
|
275
|
+
grace_compartments: number;
|
|
276
|
+
};
|
|
192
277
|
experimental: {
|
|
193
278
|
user_memories: {
|
|
194
279
|
enabled: boolean;
|
|
@@ -201,6 +286,9 @@ export interface MagicContextConfig {
|
|
|
201
286
|
/** Minimum full-read count before a file is considered for pinning (default: 4) */
|
|
202
287
|
min_reads: number;
|
|
203
288
|
};
|
|
289
|
+
/** Inject elapsed-time markers between user messages and date ranges on
|
|
290
|
+
* compartments so the agent has a wall-clock sense of the session. */
|
|
291
|
+
temporal_awareness: boolean;
|
|
204
292
|
};
|
|
205
293
|
embedding: EmbeddingConfig;
|
|
206
294
|
memory: {
|
|
@@ -263,6 +351,7 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
263
351
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
264
352
|
variant: z.ZodOptional<z.ZodString>;
|
|
265
353
|
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
354
|
+
two_pass: z.ZodDefault<z.ZodBoolean>;
|
|
266
355
|
}, z.core.$strip>>;
|
|
267
356
|
dreamer: z.ZodOptional<z.ZodObject<{
|
|
268
357
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -333,6 +422,9 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
333
422
|
execute_threshold_percentage: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
334
423
|
default: z.ZodNumber;
|
|
335
424
|
}, z.core.$catchall<z.ZodNumber>>]>>;
|
|
425
|
+
execute_threshold_tokens: z.ZodOptional<z.ZodObject<{
|
|
426
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
}, z.core.$catchall<z.ZodNumber>>>;
|
|
336
428
|
protected_tags: z.ZodOptional<z.ZodNumber>;
|
|
337
429
|
auto_drop_tool_age: z.ZodDefault<z.ZodNumber>;
|
|
338
430
|
drop_tool_structure: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -345,6 +437,14 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
345
437
|
min_clusters: z.ZodDefault<z.ZodNumber>;
|
|
346
438
|
}, z.core.$strip>>;
|
|
347
439
|
compaction_markers: z.ZodDefault<z.ZodBoolean>;
|
|
440
|
+
compressor: z.ZodDefault<z.ZodObject<{
|
|
441
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
442
|
+
min_compartment_ratio: z.ZodDefault<z.ZodNumber>;
|
|
443
|
+
max_merge_depth: z.ZodDefault<z.ZodNumber>;
|
|
444
|
+
cooldown_ms: z.ZodDefault<z.ZodNumber>;
|
|
445
|
+
max_compartments_per_pass: z.ZodDefault<z.ZodNumber>;
|
|
446
|
+
grace_compartments: z.ZodDefault<z.ZodNumber>;
|
|
447
|
+
}, z.core.$strip>>;
|
|
348
448
|
embedding: z.ZodDefault<z.ZodPipe<z.ZodObject<{
|
|
349
449
|
provider: z.ZodDefault<z.ZodEnum<{
|
|
350
450
|
local: "local";
|
|
@@ -381,6 +481,7 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
381
481
|
token_budget: z.ZodDefault<z.ZodNumber>;
|
|
382
482
|
min_reads: z.ZodDefault<z.ZodNumber>;
|
|
383
483
|
}, z.core.$strip>>;
|
|
484
|
+
temporal_awareness: z.ZodDefault<z.ZodBoolean>;
|
|
384
485
|
}, z.core.$strip>>;
|
|
385
486
|
memory: z.ZodDefault<z.ZodObject<{
|
|
386
487
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -464,6 +565,14 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
464
565
|
min_clusters: number;
|
|
465
566
|
};
|
|
466
567
|
compaction_markers: boolean;
|
|
568
|
+
compressor: {
|
|
569
|
+
enabled: boolean;
|
|
570
|
+
min_compartment_ratio: number;
|
|
571
|
+
max_merge_depth: number;
|
|
572
|
+
cooldown_ms: number;
|
|
573
|
+
max_compartments_per_pass: number;
|
|
574
|
+
grace_compartments: number;
|
|
575
|
+
};
|
|
467
576
|
embedding: {
|
|
468
577
|
provider: "local";
|
|
469
578
|
model: string;
|
|
@@ -486,6 +595,7 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
486
595
|
token_budget: number;
|
|
487
596
|
min_reads: number;
|
|
488
597
|
};
|
|
598
|
+
temporal_awareness: boolean;
|
|
489
599
|
};
|
|
490
600
|
memory: {
|
|
491
601
|
enabled: boolean;
|
|
@@ -494,6 +604,7 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
494
604
|
retrieval_count_promotion_threshold: number;
|
|
495
605
|
};
|
|
496
606
|
historian?: {
|
|
607
|
+
two_pass: boolean;
|
|
497
608
|
model?: string | undefined;
|
|
498
609
|
temperature?: number | undefined;
|
|
499
610
|
top_p?: number | undefined;
|
|
@@ -543,6 +654,10 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
543
654
|
variant?: string | undefined;
|
|
544
655
|
fallback_models?: string | string[] | undefined;
|
|
545
656
|
} | undefined;
|
|
657
|
+
execute_threshold_tokens?: {
|
|
658
|
+
[x: string]: number;
|
|
659
|
+
default?: number | undefined;
|
|
660
|
+
} | undefined;
|
|
546
661
|
protected_tags?: number | undefined;
|
|
547
662
|
sidekick?: {
|
|
548
663
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magic-context.d.ts","sourceRoot":"","sources":["../../../src/config/schema/magic-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"magic-context.d.ts","sourceRoot":"","sources":["../../../src/config/schema/magic-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,6BAA6B,QAAS,CAAC;AACpD,eAAO,MAAM,oCAAoC,KAAK,CAAC;AACvD,eAAO,MAAM,4BAA4B,SAAU,CAAC;AACpD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AACtD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AACvE,0EAA0E;AAC1E,eAAO,MAAM,wCAAwC,OAAO,CAAC;AAC7D,eAAO,MAAM,kCAAkC,IAAI,CAAC;AACpD,eAAO,MAAM,8BAA8B,SAAU,CAAC;AACtD;8FAC8F;AAC9F,eAAO,MAAM,4CAA4C,KAAK,CAAC;AAC/D;;yFAEyF;AACzF,eAAO,MAAM,qCAAqC,KAAK,CAAC;AACxD;+EAC+E;AAC/E,eAAO,MAAM,+BAA+B,EAAE,MA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C;SACrB,CAAC;QACF;+EACuE;QACvE,kBAAkB,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC;QACjB,uBAAuB,EAAE,MAAM,CAAC;QAChC,YAAY,EAAE,OAAO,CAAC;QACtB,mCAAmC,EAAE,MAAM,CAAC;KAC/C,CAAC;IACF,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+L/B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface SubstituteInput {
|
|
2
|
+
/** Raw config text before JSONC parsing. */
|
|
3
|
+
text: string;
|
|
4
|
+
/**
|
|
5
|
+
* Path of the config file the text came from. Used to resolve relative
|
|
6
|
+
* `{file:...}` references and to emit useful warnings. Pass undefined for
|
|
7
|
+
* virtual/synthetic inputs (tests) — in that case `{file:}` tokens with
|
|
8
|
+
* relative paths resolve against `cwd`, which is rarely what callers want,
|
|
9
|
+
* so callers should prefer passing a real path when one exists.
|
|
10
|
+
*/
|
|
11
|
+
configPath?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SubstituteResult {
|
|
14
|
+
/** Config text with all `{env:X}` and `{file:path}` tokens replaced. */
|
|
15
|
+
text: string;
|
|
16
|
+
/**
|
|
17
|
+
* Human-readable warnings for missing env vars, unreadable files, and
|
|
18
|
+
* unresolved tokens that fell back to empty string. Safe to surface to the
|
|
19
|
+
* user via logger/toast/startup notification.
|
|
20
|
+
*/
|
|
21
|
+
warnings: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Expand `{env:VAR}` and `{file:path}` tokens in raw config text.
|
|
25
|
+
*
|
|
26
|
+
* Mirrors OpenCode's `ConfigVariable.substitute` semantics so users can share
|
|
27
|
+
* the same patterns across `opencode.json(c)` and `magic-context.jsonc`:
|
|
28
|
+
* - `{env:VAR}` → `process.env.VAR` (trimmed key), empty string when missing
|
|
29
|
+
* - `{file:~/path}` → contents of `~/path`, JSON-escaped for safe inlining
|
|
30
|
+
* - `{file:./rel}` or `{file:rel}` → resolved against the config file's dir
|
|
31
|
+
* - `{file:/abs}` → resolved as absolute
|
|
32
|
+
*
|
|
33
|
+
* Unlike OpenCode we treat missing values as warnings rather than hard errors:
|
|
34
|
+
* magic-context config is less critical than the main OpenCode config, and a
|
|
35
|
+
* typo in an optional embedding key should not prevent the plugin from loading
|
|
36
|
+
* with other (valid) settings.
|
|
37
|
+
*
|
|
38
|
+
* File content substitution is JSON-escaped (wrapped then unwrapped through
|
|
39
|
+
* `JSON.stringify`) so line breaks, quotes, and backslashes in file contents
|
|
40
|
+
* survive the subsequent JSONC parse. Env value substitution is NOT escaped,
|
|
41
|
+
* matching OpenCode — env values are typically API keys without JSON-special
|
|
42
|
+
* characters. Users who need to embed a value with quotes or newlines should
|
|
43
|
+
* use `{file:...}`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function substituteConfigVariables(input: SubstituteInput): SubstituteResult;
|
|
46
|
+
//# sourceMappingURL=variable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../src/config/variable.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC5B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAKD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CA6ElF"}
|
|
@@ -51,7 +51,14 @@ export declare function replaceAllCompartmentState(db: Database, sessionId: stri
|
|
|
51
51
|
category: string;
|
|
52
52
|
content: string;
|
|
53
53
|
}>): void;
|
|
54
|
-
export
|
|
54
|
+
export interface CompartmentDateRanges {
|
|
55
|
+
/** Map compartment id → `{ start: "YYYY-MM-DD", end: "YYYY-MM-DD" }` */
|
|
56
|
+
byId: Map<number, {
|
|
57
|
+
start: string;
|
|
58
|
+
end: string;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
export declare function buildCompartmentBlock(compartments: Compartment[], facts: SessionFact[], memoryBlock?: string, dateRanges?: CompartmentDateRanges): string;
|
|
55
62
|
export interface RecompStaging {
|
|
56
63
|
compartments: CompartmentInput[];
|
|
57
64
|
facts: Array<{
|
|
@@ -84,6 +91,25 @@ export declare function promoteRecompStaging(db: Database, sessionId: string): {
|
|
|
84
91
|
export declare function invalidateAllMemoryBlockCaches(db: Database): void;
|
|
85
92
|
/** Clear staging tables for a session (on cancel/abandon or after successful promote). */
|
|
86
93
|
export declare function clearRecompStaging(db: Database, sessionId: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Returns the stored partial recomp range for this session, or null when the
|
|
96
|
+
* active staging (if any) is for a full recomp.
|
|
97
|
+
*
|
|
98
|
+
* A zero-valued row means "no partial range recorded" — either no staging or
|
|
99
|
+
* full-recomp staging.
|
|
100
|
+
*/
|
|
101
|
+
export declare function getRecompPartialRange(db: Database, sessionId: string): {
|
|
102
|
+
start: number;
|
|
103
|
+
end: number;
|
|
104
|
+
} | null;
|
|
105
|
+
/**
|
|
106
|
+
* Record the active partial recomp range. Must be called inside or alongside
|
|
107
|
+
* saveRecompStagingPass so staging and range marker stay in sync.
|
|
108
|
+
*/
|
|
109
|
+
export declare function setRecompPartialRange(db: Database, sessionId: string, range: {
|
|
110
|
+
start: number;
|
|
111
|
+
end: number;
|
|
112
|
+
} | null): void;
|
|
87
113
|
export declare function escapeXmlAttr(s: string): string;
|
|
88
114
|
export declare function escapeXmlContent(s: string): string;
|
|
89
115
|
//# sourceMappingURL=compartment-storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compartment-storage.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compartment-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6B3C,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAsDD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,E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B,WAAW,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"compartment-storage.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compartment-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6B3C,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAsDD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB;AA8DD,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE,CAQ9E;AAED,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKpF;AAED,wBAAgB,sBAAsB,CAClC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YA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AI,GAC7C,IAAI,CASN;AAwCD,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
|
@@ -3,4 +3,11 @@ export declare function incrementCompressionDepth(db: Database, sessionId: strin
|
|
|
3
3
|
export declare function getAverageCompressionDepth(db: Database, sessionId: string, startOrdinal: number, endOrdinal: number): number;
|
|
4
4
|
export declare function getMaxCompressionDepth(db: Database, sessionId: string): number;
|
|
5
5
|
export declare function clearCompressionDepth(db: Database, sessionId: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Clear compression depth counters for a specific message range.
|
|
8
|
+
* Used by partial recomp: rebuilt compartments start fresh at depth 0, so
|
|
9
|
+
* depth rows for the rebuilt ordinals must be removed. Existing depth for
|
|
10
|
+
* ordinals outside the range (prior and tail compartments) is preserved.
|
|
11
|
+
*/
|
|
12
|
+
export declare function clearCompressionDepthRange(db: Database, sessionId: string, startOrdinal: number, endOrdinal: number): void;
|
|
6
13
|
//# sourceMappingURL=compression-depth-storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compression-depth-storage.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compression-depth-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2D3C,wBAAgB,yBAAyB,CACrC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,IAAI,CAWN;AAED,wBAAgB,0BAA0B,CACtC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,MAAM,CAaR;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAE3E"}
|
|
1
|
+
{"version":3,"file":"compression-depth-storage.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compression-depth-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2D3C,wBAAgB,yBAAyB,CACrC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,IAAI,CAWN;AAED,wBAAgB,0BAA0B,CACtC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,MAAM,CAaR;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACtC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,IAAI,CAON"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live verification of an OpenAI-compatible embeddings endpoint.
|
|
3
|
+
*
|
|
4
|
+
* Used by `doctor` (Node) and shared in spirit with the dashboard Rust
|
|
5
|
+
* `test_embedding_endpoint` command — both POST `{model, input}` to
|
|
6
|
+
* `${endpoint}/embeddings` and classify the response. Keeping the two
|
|
7
|
+
* implementations parallel is intentional: doctor runs in the plugin's Node
|
|
8
|
+
* runtime where `fetch` + `AbortSignal.timeout` are available, while the
|
|
9
|
+
* dashboard uses Rust `reqwest` for reasons of its own async stack.
|
|
10
|
+
*/
|
|
11
|
+
export type EmbeddingProbeOutcome = {
|
|
12
|
+
kind: "ok";
|
|
13
|
+
status: number;
|
|
14
|
+
dimensions: number | null;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "auth_failed";
|
|
17
|
+
status: number;
|
|
18
|
+
preview: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "endpoint_unsupported";
|
|
21
|
+
status: number;
|
|
22
|
+
preview: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "http_error";
|
|
25
|
+
status: number;
|
|
26
|
+
preview: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: "network_error";
|
|
29
|
+
message: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "timeout";
|
|
32
|
+
timeoutMs: number;
|
|
33
|
+
} | {
|
|
34
|
+
kind: "invalid_scheme";
|
|
35
|
+
endpoint: string;
|
|
36
|
+
};
|
|
37
|
+
export interface EmbeddingProbeOptions {
|
|
38
|
+
/**
|
|
39
|
+
* Base endpoint (e.g. `https://api.openai.com/v1`). `/embeddings` is
|
|
40
|
+
* appended by the probe. Trailing slashes are trimmed so both
|
|
41
|
+
* `https://host/v1` and `https://host/v1/` work.
|
|
42
|
+
*/
|
|
43
|
+
endpoint: string;
|
|
44
|
+
model: string;
|
|
45
|
+
apiKey?: string;
|
|
46
|
+
/** Milliseconds before aborting the request. Defaults to 10000. */
|
|
47
|
+
timeoutMs?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Optional fetch override, used only by tests to avoid hitting real
|
|
50
|
+
* network endpoints. Matches the signature of the global `fetch` loosely
|
|
51
|
+
* so callers can drop a mock implementation in without overloads.
|
|
52
|
+
*/
|
|
53
|
+
fetch?: typeof fetch;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Probe an embeddings endpoint and classify the outcome.
|
|
57
|
+
*
|
|
58
|
+
* - 2xx with at least one `data[].embedding` array → `ok` with dimension count
|
|
59
|
+
* - 2xx without `data[].embedding` → `endpoint_unsupported` (e.g. routers
|
|
60
|
+
* that accept the URL but don't implement the embeddings spec)
|
|
61
|
+
* - 401 / 403 → `auth_failed`
|
|
62
|
+
* - 404 / 405 → `endpoint_unsupported` (route not available at this URL)
|
|
63
|
+
* - Other non-2xx → `http_error` with preview
|
|
64
|
+
* - `AbortError` from timeout → `timeout`
|
|
65
|
+
* - Any other thrown error → `network_error`
|
|
66
|
+
* - Missing or non-http(s) scheme → `invalid_scheme` (no request made)
|
|
67
|
+
*/
|
|
68
|
+
export declare function probeEmbeddingEndpoint(options: EmbeddingProbeOptions): Promise<EmbeddingProbeOutcome>;
|
|
69
|
+
//# sourceMappingURL=embedding-probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding-probe.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,qBAAqB,GAC3B;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB;AAKD;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CACxC,OAAO,EAAE,qBAAqB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CA+EhC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { ContextUsage, SchedulerDecision, SessionMeta } from "./types";
|
|
2
2
|
export interface Scheduler {
|
|
3
|
-
shouldExecute(sessionMeta: SessionMeta, contextUsage: ContextUsage, currentTime?: number, sessionId?: string, modelKey?: string): SchedulerDecision;
|
|
3
|
+
shouldExecute(sessionMeta: SessionMeta, contextUsage: ContextUsage, currentTime?: number, sessionId?: string, modelKey?: string, contextLimit?: number): SchedulerDecision;
|
|
4
4
|
}
|
|
5
5
|
interface SchedulerConfig {
|
|
6
6
|
executeThresholdPercentage: number | {
|
|
7
7
|
default: number;
|
|
8
8
|
[modelKey: string]: number;
|
|
9
9
|
};
|
|
10
|
+
executeThresholdTokens?: {
|
|
11
|
+
default?: number;
|
|
12
|
+
[modelKey: string]: number | undefined;
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
15
|
export declare function parseCacheTtl(ttl: string): number;
|
|
12
16
|
export declare function createScheduler(config: SchedulerConfig): Scheduler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/scheduler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAW5E,MAAM,WAAW,SAAS;IACtB,aAAa,CACT,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/scheduler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAW5E,MAAM,WAAW,SAAS;IACtB,aAAa,CACT,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACtB,iBAAiB,CAAC;CACxB;AAED,UAAU,eAAe;IACrB,0BAA0B,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACrF,sBAAsB,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;CACzF;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBjD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAmElE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-db.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/storage-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAkBtC,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"storage-db.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/storage-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAkBtC,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAuTrD;AA6FD,wBAAgB,YAAY,IAAI,QAAQ,CAsCvC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAEzD;AAED,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAEvE;AAED,wBAAgB,aAAa,IAAI,IAAI,CAUpC;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic rule-based text compression in the style of caveman-speak.
|
|
3
|
+
*
|
|
4
|
+
* Inspired by the caveman Claude Code skill (JuliusBrussee/caveman, 40k stars)
|
|
5
|
+
* which validated telegraph-style compression as the right LLM-friendly
|
|
6
|
+
* compression style — backed by research showing brevity constraints can
|
|
7
|
+
* actually improve LLM accuracy (arxiv 2604.00025, March 2026).
|
|
8
|
+
*
|
|
9
|
+
* This module is pure and stateless. It takes text, applies progressively
|
|
10
|
+
* aggressive rule-based transformations by level, and returns the compressed
|
|
11
|
+
* output. It is used by the compressor to post-process historian output at
|
|
12
|
+
* depths 2-4, enforcing style consistency without relying on LLM compliance.
|
|
13
|
+
*
|
|
14
|
+
* Preservation guarantees (all levels):
|
|
15
|
+
* - Code blocks (` and ``` fenced)
|
|
16
|
+
* - URLs (http://, https://)
|
|
17
|
+
* - File paths (contain / or start with ./ or ../)
|
|
18
|
+
* - Commit hashes (7-40 hex chars at word boundaries)
|
|
19
|
+
* - Compartment markers (§N§, U: lines, msg_*, ses_*, toolu_*)
|
|
20
|
+
* - Lines starting with "U: " (user quotes — irreplaceable phrasing)
|
|
21
|
+
*
|
|
22
|
+
* Compression by level:
|
|
23
|
+
* - lite (depth 2): drops filler words and hedging
|
|
24
|
+
* - full (depth 3): lite + drops articles and most auxiliaries, allows fragments
|
|
25
|
+
* - ultra (depth 4): full + symbol connectives and common-term abbreviation
|
|
26
|
+
*/
|
|
27
|
+
export type CavemanLevel = "lite" | "full" | "ultra";
|
|
28
|
+
/** Compress `text` using caveman-style rules at the given `level`.
|
|
29
|
+
*
|
|
30
|
+
* Preserved regions (code, URLs, paths, hashes, tag markers, U: lines) are
|
|
31
|
+
* never modified. Only surrounding prose is transformed.
|
|
32
|
+
*
|
|
33
|
+
* The function is pure: same input always produces the same output. */
|
|
34
|
+
export declare function cavemanCompress(text: string, level: CavemanLevel): string;
|
|
35
|
+
//# sourceMappingURL=caveman.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caveman.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/caveman.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AA2SrD;;;;;wEAKwE;AACxE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAgCzE"}
|
|
@@ -2,7 +2,24 @@ import type { Database } from "bun:sqlite";
|
|
|
2
2
|
import type { DreamerConfig, SidekickConfig } from "../../config/schema/magic-context";
|
|
3
3
|
import { type DreamRunResult } from "../../features/magic-context/dreamer";
|
|
4
4
|
import type { PluginContext } from "../../plugin/types";
|
|
5
|
+
import { type PartialRecompRange } from "./compartment-runner-partial-recomp";
|
|
5
6
|
import type { NotificationParams } from "./send-session-notification";
|
|
7
|
+
/** Parse `/ctx-recomp` arguments.
|
|
8
|
+
*
|
|
9
|
+
* Accepted forms:
|
|
10
|
+
* - empty / whitespace-only → full recomp
|
|
11
|
+
* - `<start>-<end>` → partial recomp with explicit inclusive range
|
|
12
|
+
*
|
|
13
|
+
* Returns an error object for unparseable or nonsensical inputs. */
|
|
14
|
+
export declare function parseRecompArgs(raw: string): {
|
|
15
|
+
kind: "full";
|
|
16
|
+
} | {
|
|
17
|
+
kind: "partial";
|
|
18
|
+
range: PartialRecompRange;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "error";
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
6
23
|
export interface CommandExecuteInput {
|
|
7
24
|
command: string;
|
|
8
25
|
sessionID: string;
|
|
@@ -22,14 +39,25 @@ export declare function createMagicContextCommandHandler(deps: {
|
|
|
22
39
|
default: number;
|
|
23
40
|
[modelKey: string]: number;
|
|
24
41
|
};
|
|
42
|
+
executeThresholdTokens?: {
|
|
43
|
+
default?: number;
|
|
44
|
+
[modelKey: string]: number | undefined;
|
|
45
|
+
};
|
|
25
46
|
historyBudgetPercentage?: number;
|
|
26
47
|
commitClusterTrigger?: {
|
|
27
48
|
enabled: boolean;
|
|
28
49
|
min_clusters: number;
|
|
29
50
|
};
|
|
30
51
|
getLiveModelKey?: (sessionId: string) => string | undefined;
|
|
52
|
+
/** Optional live context limit resolver — used for tokens-based threshold display. */
|
|
53
|
+
getContextLimit?: (sessionId: string) => number | undefined;
|
|
31
54
|
onFlush?: (sessionId: string) => void;
|
|
32
|
-
|
|
55
|
+
/** Runs /ctx-recomp. When `range` is provided, runs partial recomp over
|
|
56
|
+
* that range (snapped to enclosing compartment boundaries). When omitted,
|
|
57
|
+
* runs full recomp from message 1 to the protected tail. */
|
|
58
|
+
executeRecomp?: (sessionId: string, options?: {
|
|
59
|
+
range?: PartialRecompRange;
|
|
60
|
+
}) => Promise<string>;
|
|
33
61
|
sendNotification: (sessionId: string, text: string, params: NotificationParams) => Promise<void>;
|
|
34
62
|
sidekick?: {
|
|
35
63
|
config: SidekickConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/command-handler.ts"],"names":[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