@cortexkit/opencode-magic-context 0.31.5 → 0.32.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 +3 -3
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +2 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +9 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/cron.d.ts +2 -2
- package/dist/features/magic-context/dreamer/cron.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts +6 -2
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +7 -4
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts +8 -16
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/plugin-messages.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-backfill.d.ts +6 -3
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-storage.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/capabilities.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts +3 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/runner.d.ts +1 -0
- package/dist/features/magic-context/smart-notes/runner.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts +8 -1
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/ssrf-guard.d.ts +10 -0
- package/dist/features/magic-context/smart-notes/ssrf-guard.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/storage.d.ts +16 -1
- package/dist/features/magic-context/smart-notes/storage.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts +34 -0
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +8 -5
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-schema-helpers.d.ts +3 -4
- package/dist/features/magic-context/storage-schema-helpers.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +11 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +2 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +10 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/tool-owner-backfill.d.ts +2 -0
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +24 -0
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts +12 -0
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts +7 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/decay-render.d.ts +2 -0
- package/dist/hooks/magic-context/decay-render.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts +1 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +29 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +1 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +3 -0
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +8 -9
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts +5 -4
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +17 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +2 -2
- package/dist/hooks/magic-context/read-session-raw.d.ts +32 -2
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/shadow-sender.d.ts +300 -0
- package/dist/hooks/magic-context/shadow-sender.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-content-primitives.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +8 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/temporal-awareness.d.ts +3 -3
- package/dist/hooks/magic-context/transform-operations.d.ts +1 -1
- package/dist/hooks/magic-context/transform-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +32 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +4 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5418 -972
- package/dist/plugin/hooks/create-session-hooks.d.ts +48 -175
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +3 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts +5 -0
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/rpc-client.d.ts +3 -1
- package/dist/shared/rpc-client.d.ts.map +1 -1
- package/dist/shared/rpc-notifications.d.ts +11 -6
- package/dist/shared/rpc-notifications.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts +2 -2
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts +18 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/tui-config.d.ts +5 -3
- package/dist/shared/tui-config.d.ts.map +1 -1
- package/dist/tools/ctx-expand/constants.d.ts +1 -1
- package/dist/tools/ctx-expand/constants.d.ts.map +1 -1
- package/dist/tui/data/context-db.d.ts +9 -2
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/dist/tui/data/notification-socket.d.ts +4 -5
- package/dist/tui/data/notification-socket.d.ts.map +1 -1
- package/dist/tui-compiled/data/context-db.d.ts +9 -2
- package/dist/tui-compiled/data/context-db.d.ts.map +1 -1
- package/dist/tui-compiled/data/notification-socket.d.ts +4 -5
- package/dist/tui-compiled/data/notification-socket.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/shared/models-dev-cache.test.ts +5 -0
- package/src/shared/models-dev-cache.ts +44 -6
- package/src/shared/opencode-compaction-detector.test.ts +11 -2
- package/src/shared/rpc-client.test.ts +213 -9
- package/src/shared/rpc-client.ts +48 -39
- package/src/shared/rpc-notifications.test.ts +26 -5
- package/src/shared/rpc-notifications.ts +44 -35
- package/src/shared/rpc-server.ts +77 -33
- package/src/shared/sqlite.ts +22 -3
- package/src/shared/tag-transcript.test.ts +253 -7
- package/src/shared/tag-transcript.ts +422 -114
- package/src/shared/tui-config.test.ts +4 -12
- package/src/shared/tui-config.ts +6 -6
- package/src/tui/data/context-db.test.ts +113 -0
- package/src/tui/data/context-db.ts +26 -19
- package/src/tui/data/notification-socket.test.ts +277 -11
- package/src/tui/data/notification-socket.ts +257 -86
- package/src/tui/index.tsx +33 -25
- package/src/tui/slots/sidebar-content.tsx +62 -24
- package/src/tui-compiled/data/context-db.ts +26 -19
- package/src/tui-compiled/data/notification-socket.ts +257 -86
- package/src/tui-compiled/index.tsx +41 -24
- package/src/tui-compiled/slots/sidebar-content.tsx +45 -23
|
@@ -10,47 +10,59 @@ import type { PluginContext } from "../types";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPluginConfig): {
|
|
12
12
|
protected_tags: number;
|
|
13
|
-
cache_ttl: string | {
|
|
14
|
-
[modelKey: string]: string;
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
clear_reasoning_age: number;
|
|
18
|
-
toast_duration_ms: number | undefined;
|
|
19
13
|
execute_threshold_percentage: number | {
|
|
20
14
|
[modelKey: string]: number;
|
|
21
15
|
default: number;
|
|
22
16
|
};
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
disabled_hooks?: string[];
|
|
18
|
+
command?: Record<string, {
|
|
19
|
+
template: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
agent?: string;
|
|
22
|
+
model?: string;
|
|
23
|
+
subtask?: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
auto_update?: boolean;
|
|
27
|
+
language?: string;
|
|
28
|
+
historian?: import("../../config/schema").HistorianConfig;
|
|
29
|
+
dreamer?: import("../../config/schema").DreamerConfig;
|
|
30
|
+
cache_ttl: string | {
|
|
31
|
+
default: string;
|
|
32
|
+
[modelKey: string]: string;
|
|
33
|
+
};
|
|
34
|
+
toast_duration_ms?: number;
|
|
35
|
+
execute_threshold_tokens?: {
|
|
25
36
|
default?: number;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
disallowed_tools: ("*" | "read" | "aft_outline" | "aft_zoom" | "aft_search")[];
|
|
30
|
-
model?: string | undefined;
|
|
31
|
-
temperature?: number | undefined;
|
|
32
|
-
top_p?: number | undefined;
|
|
33
|
-
prompt?: string | undefined;
|
|
34
|
-
tools?: Record<string, boolean> | undefined;
|
|
35
|
-
disable?: boolean | undefined;
|
|
36
|
-
description?: string | undefined;
|
|
37
|
-
mode?: "subagent" | "primary" | "all" | undefined;
|
|
38
|
-
color?: string | undefined;
|
|
39
|
-
maxSteps?: number | undefined;
|
|
40
|
-
permission?: {
|
|
41
|
-
edit?: "deny" | "allow" | "ask" | undefined;
|
|
42
|
-
bash?: "deny" | "allow" | "ask" | Record<string, "deny" | "allow" | "ask"> | undefined;
|
|
43
|
-
webfetch?: "deny" | "allow" | "ask" | undefined;
|
|
44
|
-
doom_loop?: "deny" | "allow" | "ask" | undefined;
|
|
45
|
-
external_directory?: "deny" | "allow" | "ask" | undefined;
|
|
46
|
-
} | undefined;
|
|
47
|
-
maxTokens?: number | undefined;
|
|
48
|
-
variant?: string | undefined;
|
|
49
|
-
fallback_models?: string | string[] | undefined;
|
|
50
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
51
|
-
} | undefined;
|
|
37
|
+
[modelKey: string]: number | undefined;
|
|
38
|
+
};
|
|
39
|
+
clear_reasoning_age: number;
|
|
52
40
|
history_budget_percentage: number;
|
|
53
41
|
historian_timeout_ms: number;
|
|
42
|
+
commit_cluster_trigger: {
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
min_clusters: number;
|
|
45
|
+
};
|
|
46
|
+
sqlite: {
|
|
47
|
+
cache_size_mb: number;
|
|
48
|
+
mmap_size_mb: number;
|
|
49
|
+
};
|
|
50
|
+
system_prompt_injection: {
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
skip_signatures: string[];
|
|
53
|
+
};
|
|
54
|
+
temporal_awareness: boolean;
|
|
55
|
+
keep_subagents: boolean;
|
|
56
|
+
todowrite: {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
overlay: boolean;
|
|
59
|
+
};
|
|
60
|
+
smart_drops: boolean;
|
|
61
|
+
caveman_text_compression: {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
min_chars: number;
|
|
64
|
+
};
|
|
65
|
+
embedding: import("../../config/schema").EmbeddingConfig;
|
|
54
66
|
memory: {
|
|
55
67
|
enabled: boolean;
|
|
56
68
|
injection_budget_tokens: number;
|
|
@@ -67,149 +79,10 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
67
79
|
max_commits: number;
|
|
68
80
|
};
|
|
69
81
|
};
|
|
70
|
-
|
|
71
|
-
timeout_ms: number;
|
|
72
|
-
model?: string | undefined;
|
|
73
|
-
temperature?: number | undefined;
|
|
74
|
-
top_p?: number | undefined;
|
|
75
|
-
prompt?: string | undefined;
|
|
76
|
-
tools?: Record<string, boolean> | undefined;
|
|
77
|
-
disable?: boolean | undefined;
|
|
78
|
-
description?: string | undefined;
|
|
79
|
-
mode?: "subagent" | "primary" | "all" | undefined;
|
|
80
|
-
color?: string | undefined;
|
|
81
|
-
maxSteps?: number | undefined;
|
|
82
|
-
permission?: {
|
|
83
|
-
edit?: "deny" | "allow" | "ask" | undefined;
|
|
84
|
-
bash?: "deny" | "allow" | "ask" | Record<string, "deny" | "allow" | "ask"> | undefined;
|
|
85
|
-
webfetch?: "deny" | "allow" | "ask" | undefined;
|
|
86
|
-
doom_loop?: "deny" | "allow" | "ask" | undefined;
|
|
87
|
-
external_directory?: "deny" | "allow" | "ask" | undefined;
|
|
88
|
-
} | undefined;
|
|
89
|
-
maxTokens?: number | undefined;
|
|
90
|
-
variant?: string | undefined;
|
|
91
|
-
fallback_models?: string | string[] | undefined;
|
|
92
|
-
system_prompt?: string | undefined;
|
|
93
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
94
|
-
} | undefined;
|
|
95
|
-
dreamer: {
|
|
96
|
-
tasks: {
|
|
97
|
-
"map-memories": {
|
|
98
|
-
schedule: string;
|
|
99
|
-
timeout_minutes: number;
|
|
100
|
-
model?: string | undefined;
|
|
101
|
-
fallback_models?: string | string[] | undefined;
|
|
102
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
103
|
-
};
|
|
104
|
-
verify: {
|
|
105
|
-
schedule: string;
|
|
106
|
-
timeout_minutes: number;
|
|
107
|
-
model?: string | undefined;
|
|
108
|
-
fallback_models?: string | string[] | undefined;
|
|
109
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
110
|
-
};
|
|
111
|
-
"verify-broad": {
|
|
112
|
-
schedule: string;
|
|
113
|
-
timeout_minutes: number;
|
|
114
|
-
model?: string | undefined;
|
|
115
|
-
fallback_models?: string | string[] | undefined;
|
|
116
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
117
|
-
};
|
|
118
|
-
curate: {
|
|
119
|
-
schedule: string;
|
|
120
|
-
timeout_minutes: number;
|
|
121
|
-
model?: string | undefined;
|
|
122
|
-
fallback_models?: string | string[] | undefined;
|
|
123
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
124
|
-
};
|
|
125
|
-
"classify-memories": {
|
|
126
|
-
schedule: string;
|
|
127
|
-
timeout_minutes: number;
|
|
128
|
-
model?: string | undefined;
|
|
129
|
-
fallback_models?: string | string[] | undefined;
|
|
130
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
131
|
-
};
|
|
132
|
-
retrospective: {
|
|
133
|
-
schedule: string;
|
|
134
|
-
timeout_minutes: number;
|
|
135
|
-
model?: string | undefined;
|
|
136
|
-
fallback_models?: string | string[] | undefined;
|
|
137
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
138
|
-
};
|
|
139
|
-
"maintain-docs": {
|
|
140
|
-
schedule: string;
|
|
141
|
-
timeout_minutes: number;
|
|
142
|
-
model?: string | undefined;
|
|
143
|
-
fallback_models?: string | string[] | undefined;
|
|
144
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
145
|
-
};
|
|
146
|
-
"evaluate-smart-notes": {
|
|
147
|
-
schedule: string;
|
|
148
|
-
timeout_minutes: number;
|
|
149
|
-
model?: string | undefined;
|
|
150
|
-
fallback_models?: string | string[] | undefined;
|
|
151
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
152
|
-
};
|
|
153
|
-
"review-user-memories": {
|
|
154
|
-
schedule: string;
|
|
155
|
-
timeout_minutes: number;
|
|
156
|
-
model?: string | undefined;
|
|
157
|
-
fallback_models?: string | string[] | undefined;
|
|
158
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
159
|
-
promotion_threshold?: number | undefined;
|
|
160
|
-
};
|
|
161
|
-
"promote-primers": {
|
|
162
|
-
schedule: string;
|
|
163
|
-
timeout_minutes: number;
|
|
164
|
-
model?: string | undefined;
|
|
165
|
-
fallback_models?: string | string[] | undefined;
|
|
166
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
167
|
-
promotion_threshold?: number | undefined;
|
|
168
|
-
};
|
|
169
|
-
"refresh-primers": {
|
|
170
|
-
schedule: string;
|
|
171
|
-
timeout_minutes: number;
|
|
172
|
-
model?: string | undefined;
|
|
173
|
-
fallback_models?: string | string[] | undefined;
|
|
174
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
inject_docs: boolean;
|
|
178
|
-
model?: string | undefined;
|
|
179
|
-
temperature?: number | undefined;
|
|
180
|
-
top_p?: number | undefined;
|
|
181
|
-
prompt?: string | undefined;
|
|
182
|
-
tools?: Record<string, boolean> | undefined;
|
|
183
|
-
disable?: boolean | undefined;
|
|
184
|
-
description?: string | undefined;
|
|
185
|
-
mode?: "subagent" | "primary" | "all" | undefined;
|
|
186
|
-
color?: string | undefined;
|
|
187
|
-
maxSteps?: number | undefined;
|
|
188
|
-
permission?: {
|
|
189
|
-
edit?: "deny" | "allow" | "ask" | undefined;
|
|
190
|
-
bash?: "deny" | "allow" | "ask" | Record<string, "deny" | "allow" | "ask"> | undefined;
|
|
191
|
-
webfetch?: "deny" | "allow" | "ask" | undefined;
|
|
192
|
-
doom_loop?: "deny" | "allow" | "ask" | undefined;
|
|
193
|
-
external_directory?: "deny" | "allow" | "ask" | undefined;
|
|
194
|
-
} | undefined;
|
|
195
|
-
maxTokens?: number | undefined;
|
|
196
|
-
variant?: string | undefined;
|
|
197
|
-
fallback_models?: string | string[] | undefined;
|
|
198
|
-
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
199
|
-
} | undefined;
|
|
200
|
-
commit_cluster_trigger: {
|
|
201
|
-
enabled: boolean;
|
|
202
|
-
min_clusters: number;
|
|
203
|
-
};
|
|
204
|
-
system_prompt_injection: {
|
|
82
|
+
shadow_transform: {
|
|
205
83
|
enabled: boolean;
|
|
206
|
-
skip_signatures: string[];
|
|
207
|
-
};
|
|
208
|
-
temporal_awareness: boolean;
|
|
209
|
-
caveman_text_compression: {
|
|
210
|
-
enabled: boolean;
|
|
211
|
-
min_chars: number;
|
|
212
84
|
};
|
|
85
|
+
sidekick?: import("../../config/schema").SidekickConfig;
|
|
213
86
|
};
|
|
214
87
|
export declare function createSessionHooks(args: {
|
|
215
88
|
ctx: PluginContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB
|
|
1
|
+
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;;;;mBACxE,CAAC;aAA2B,CAAC;aAA2B,CAAC;eACjD,CAAC;;;;;;;;;;;;;eA8Cgja,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAjCnka;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;CACtC;;;;;;qBA2B+wL,CAAC;;;;;;;;;;;;qBAAxxD,CAAC;mBAAyB,CAAC;iBAAuB,CAAC;iBAAuB,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAA+trC,CAAC;;;;;;EADp0zC"}
|
|
@@ -8,6 +8,9 @@ import type { LiveSessionState } from "../hooks/magic-context/live-session-state
|
|
|
8
8
|
import type { MagicContextRpcServer } from "../shared/rpc-server";
|
|
9
9
|
import type { SidebarSnapshot, StatusDetail } from "../shared/rpc-types";
|
|
10
10
|
export declare function buildSidebarSnapshot(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>): SidebarSnapshot;
|
|
11
|
+
/** Convert snapshot-build failures into a transport-failure envelope. A genuine
|
|
12
|
+
* zero snapshot remains a successful value so deleted sessions stay deleted. */
|
|
13
|
+
export declare function buildSidebarSnapshotRpcResponse(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>): Record<string, unknown>;
|
|
11
14
|
export declare function buildStatusDetail(db: Database, sessionId: string, directory: string, modelKey?: string, config?: Record<string, unknown>, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number): StatusDetail;
|
|
12
15
|
/**
|
|
13
16
|
* Register all RPC handlers on the server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAGnC,MAAM,mCAAmC,CAAC;AAc3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAoBlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAe,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA0FtF,wBAAgB,oBAAoB,CAChC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,qBAAqB,CAAC,EAAE,MAAM,EAK9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,eAAe,
|
|
1
|
+
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mapp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,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;CACtC,GACF,IAAI,CA4ON"}
|
|
@@ -103,6 +103,11 @@ export declare function resetAuthRewarmLatchForTest(): void;
|
|
|
103
103
|
* own resolution path is used.
|
|
104
104
|
*/
|
|
105
105
|
export declare function getSdkContextLimit(providerID: string, modelID: string): number | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Return only a provider-declared input cap. A combined context window is useful
|
|
108
|
+
* for scheduling but is not safe as a fail-closed prompt boundary.
|
|
109
|
+
*/
|
|
110
|
+
export declare function getSdkInputLimit(providerID: string, modelID: string): number | undefined;
|
|
106
111
|
/** Clear in-memory caches (for testing and the regression-recovery refetch). */
|
|
107
112
|
export declare function clearModelsDevCache(): void;
|
|
108
113
|
/** Inspection helpers (for logging / debugging). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,UAAU,kBAAkB;IACxB,MAAM,EAAE;QACJ,SAAS,EAAE,MAAM,OAAO,CAAC;YAAE,IAAI,CAAC,EAAE;gBAAE,SAAS,CAAC,EAAE,OAAO,CAAA;aAAE,CAAA;SAAE,CAAC,CAAC;KAChE,CAAC;CACL;AASD,eAAO,MAAM,cAAc,QAAS,CAAC;AACrC,eAAO,MAAM,cAAc,UAAY,CAAC;AAExC;;kFAEkF;AAClF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAEtE;
|
|
1
|
+
{"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH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
|
1
1
|
export declare class MagicContextRpcClient {
|
|
2
2
|
private port;
|
|
3
3
|
private token;
|
|
4
|
+
private instanceId;
|
|
4
5
|
private portDir;
|
|
5
6
|
private legacyPortFilePath;
|
|
6
7
|
private healthChecked;
|
|
@@ -16,9 +17,10 @@ export declare class MagicContextRpcClient {
|
|
|
16
17
|
resolveEndpoint(): Promise<{
|
|
17
18
|
port: number;
|
|
18
19
|
token: string | null;
|
|
20
|
+
instanceId: string | null;
|
|
19
21
|
} | null>;
|
|
20
22
|
private resolvePort;
|
|
21
|
-
private
|
|
23
|
+
private readPortFiles;
|
|
22
24
|
private healthCheck;
|
|
23
25
|
private fetchWithTimeout;
|
|
24
26
|
reset(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-client.ts"],"names":[],"mappings":"AAiBA,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,aAAa,CAAS;gBAElB,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAKjD,iFAAiF;IAC3E,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACrC,OAAO,CAAC,CAAC,CAAC;IAwDb,4CAA4C;IACtC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IASrC;;;yEAGqE;IAC/D,eAAe,IAAI,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-client.ts"],"names":[],"mappings":"AAiBA,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,aAAa,CAAS;gBAElB,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAKjD,iFAAiF;IAC3E,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACrC,OAAO,CAAC,CAAC,CAAC;IAwDb,4CAA4C;IACtC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IASrC;;;yEAGqE;IAC/D,eAAe,IAAI,OAAO,CAAC;QAC7B,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B,GAAG,IAAI,CAAC;YAYK,WAAW;IAwBzB,OAAO,CAAC,aAAa;YA+BP,WAAW;YAoBX,gBAAgB;IAU9B,KAAK,IAAI,IAAI;CAMhB"}
|
|
@@ -21,6 +21,8 @@ export interface RpcNotification {
|
|
|
21
21
|
export interface NotificationSink {
|
|
22
22
|
/** The TUI's active session at connect time (its hello scope). */
|
|
23
23
|
sessionId?: string;
|
|
24
|
+
/** Protocol 2 clients use strict session scoping; absent means legacy behavior. */
|
|
25
|
+
protocol?: number;
|
|
24
26
|
/** Deliver one notification over this sink's live socket. */
|
|
25
27
|
send: (notification: RpcNotification) => void;
|
|
26
28
|
}
|
|
@@ -30,8 +32,11 @@ export declare function registerNotificationSink(sink: NotificationSink): () =>
|
|
|
30
32
|
* also enqueues it so a TUI that is momentarily disconnected (reconnecting, or
|
|
31
33
|
* not yet connected) still receives it on its next hello via the backlog drain.
|
|
32
34
|
* At-least-once: a live push that the socket drops is re-delivered from the
|
|
33
|
-
* queue on reconnect (pruned only when the client
|
|
35
|
+
* queue on reconnect (pruned only when the client acknowledges it). */
|
|
34
36
|
export declare function pushNotification(type: string, payload: Record<string, unknown>, sessionId?: string): void;
|
|
37
|
+
export declare function acknowledgeNotifications(ids: readonly number[]): void;
|
|
38
|
+
/** Reset process-local state to simulate a fresh server module in protocol tests. */
|
|
39
|
+
export declare function __resetNotificationStateForTests(): void;
|
|
35
40
|
export interface DrainNotificationsOptions {
|
|
36
41
|
/**
|
|
37
42
|
* Cursor for global notifications when a session-scoped client sends separate
|
|
@@ -53,8 +58,8 @@ export interface DrainNotificationsOptions {
|
|
|
53
58
|
* behavior.
|
|
54
59
|
*
|
|
55
60
|
* Delivery is at-least-once (non-destructive return + prune-on-ack): a returned
|
|
56
|
-
* notification stays queued until
|
|
57
|
-
*
|
|
61
|
+
* notification stays queued until an exact acknowledgement or a legacy cursor
|
|
62
|
+
* removes it, so a dropped WS socket re-delivers unhandled backlog on reconnect. */
|
|
58
63
|
export declare function drainNotifications(lastReceivedId?: number, sessionId?: string, options?: DrainNotificationsOptions): RpcNotification[];
|
|
59
64
|
/** Whether a TUI client is connected via a live notification socket.
|
|
60
65
|
* Now exact socket liveness (a registered WS sink), not a poll-drain timestamp.
|
|
@@ -62,8 +67,8 @@ export declare function drainNotifications(lastReceivedId?: number, sessionId?:
|
|
|
62
67
|
* Pass `sessionId` (preferred) to ask whether a TUI is connected FOR THAT
|
|
63
68
|
* SESSION — this is what producers (`/ctx-status`, `/ctx-recomp`, the upgrade
|
|
64
69
|
* reminder) must use to decide dialog-vs-message, so a TUI on a different
|
|
65
|
-
* session in the same process does not misroute their delivery. A
|
|
66
|
-
* sink
|
|
67
|
-
* callers with no session context
|
|
70
|
+
* session in the same process does not misroute their delivery. A modern
|
|
71
|
+
* session-less sink is global-only; a legacy sink retains broad compatibility.
|
|
72
|
+
* Omit `sessionId` only for callers with no session context. */
|
|
68
73
|
export declare function isTuiConnected(sessionId?: string): boolean;
|
|
69
74
|
//# sourceMappingURL=rpc-notifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-notifications.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAKD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,IAAI,EAAE,CAAC,YAAY,EAAE,eAAe,KAAK,IAAI,CAAC;CACjD;AAYD,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAK3E;
|
|
1
|
+
{"version":3,"file":"rpc-notifications.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAKD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,IAAI,EAAE,CAAC,YAAY,EAAE,eAAe,KAAK,IAAI,CAAC;CACjD;AAYD,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAK3E;AAUD;;;;wEAIwE;AACxE,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,SAAS,CAAC,EAAE,MAAM,GACnB,IAAI,CA+BN;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAMrE;AAED,qFAAqF;AACrF,wBAAgB,gCAAgC,IAAI,IAAI,CAIvD;AAED,MAAM,WAAW,yBAAyB;IACtC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAMD;;;;;;;;;;;qFAWqF;AACrF,wBAAgB,kBAAkB,CAC9B,cAAc,SAAI,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,yBAA8B,GACxC,eAAe,EAAE,CAqDnB;AAED;;;;;;;;iEAQiE;AACjE,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAQ1D"}
|
|
@@ -33,8 +33,8 @@ export declare class MagicContextRpcServer {
|
|
|
33
33
|
/** HTTP route handler (Bun fetch). Returns a Response, or undefined when the
|
|
34
34
|
* request was upgraded to a WebSocket. */
|
|
35
35
|
private handleFetch;
|
|
36
|
-
/** WS message handler: hello (auth + sink registration + backlog
|
|
37
|
-
* ack (
|
|
36
|
+
/** WS message handler: hello (auth + sink registration + backlog delivery) and
|
|
37
|
+
* ack (exact removal or legacy cursor pruning). All other messages are ignored. */
|
|
38
38
|
private handleWsMessage;
|
|
39
39
|
}
|
|
40
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-server.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc-server.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-server.ts"],"names":[],"mappings":"AAsBA,KAAK,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AA8CxF;;;;;;;;;;;GAWG;AACH,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;IAC7D,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAsC;IAMrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmC;gBAE7C,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAKjD,sCAAsC;IACtC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAIjD,6DAA6D;IACvD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IA6F9B,6EAA6E;IAC7E,IAAI,IAAI,IAAI;IAuBZ,OAAO,CAAC,uBAAuB;IAgB/B;+CAC2C;YAC7B,WAAW;IAyDzB;wFACoF;IACpF,OAAO,CAAC,eAAe;CA8H1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,OAAO,KAAK,aAAa,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,OAAO,KAAK,aAAa,MAAM,gBAAgB,CAAC;AA4IhD,eAAO,MAAM,QAAQ,EAAE,OAAO,aAA4B,CAAC;AAE3D,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -66,6 +66,24 @@ export interface TagTranscriptOptions {
|
|
|
66
66
|
* contentId) since all parts of a message share one fingerprint.
|
|
67
67
|
*/
|
|
68
68
|
entryFingerprintByMessageId?: ReadonlyMap<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* Stable Pi message ids observed on a prior pass. Their immutable parts may
|
|
71
|
+
* reuse tag assignments while this pass still reapplies visible prefixes and
|
|
72
|
+
* rebuilds the complete set of messages affected by each tag.
|
|
73
|
+
*/
|
|
74
|
+
reuseMessageIds?: ReadonlySet<string>;
|
|
75
|
+
/** Exact text/count pairs retained by Pi for safe lazy-token backfill reuse. */
|
|
76
|
+
textTokenCache?: Map<string, {
|
|
77
|
+
text: string;
|
|
78
|
+
tokenCount: number;
|
|
79
|
+
}>;
|
|
80
|
+
/** Exact tool-result text/count pairs retained under composite tag identity. */
|
|
81
|
+
toolTokenCache?: Map<string, {
|
|
82
|
+
text: string;
|
|
83
|
+
tokenCount: number;
|
|
84
|
+
}>;
|
|
85
|
+
/** Optional process-local benchmark callback; production callers omit it. */
|
|
86
|
+
onTiming?: (phase: "identity" | "prefix" | "targets" | "tokenCounting", elapsedMs: number) => void;
|
|
69
87
|
}
|
|
70
88
|
export interface TagTranscriptResult {
|
|
71
89
|
targets: Map<number, TagTarget>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;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EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,CACP,KAAK,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,eAAe,EAC1D,SAAS,EAAE,MAAM,KAChB,IAAI,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC;AAuED,wBAAgB,aAAa,CACzB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE,oBAAyB,GACnC,mBAAmB,CA2VrB"}
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* through setup or doctor.
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
|
-
* Ensure
|
|
12
|
-
* Creates tui.
|
|
11
|
+
* Ensure the selected TUI config has the magic-context plugin entry.
|
|
12
|
+
* Creates tui.jsonc if neither TUI config exists. Silently skips if already present.
|
|
13
13
|
*/
|
|
14
|
-
export declare function ensureTuiPluginEntry(
|
|
14
|
+
export declare function ensureTuiPluginEntry(options?: {
|
|
15
|
+
configDir?: string;
|
|
16
|
+
}): boolean;
|
|
15
17
|
//# sourceMappingURL=tui-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui-config.d.ts","sourceRoot":"","sources":["../../src/shared/tui-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyEH;;;GAGG;AACH,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"tui-config.d.ts","sourceRoot":"","sources":["../../src/shared/tui-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyEH;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAqDlF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const CTX_EXPAND_DESCRIPTION = "Recover the original conversation from your compacted history.\n\nOlder parts of this session are summarized
|
|
1
|
+
export declare const CTX_EXPAND_DESCRIPTION = "Recover the original conversation from your compacted history.\n\nOlder parts of this session are summarized under `## start-end \u00B7 date \u00B7 title` headings inside <session-history> \u2014 e.g. `## 120-245 \u00B7 \u2026 \u00B7 Fixed tagger collision`. Each heading replaces the raw messages in that ordinal range with a summary. When the summary isn't enough \u2014 you need exact wording, a specific value, an error message, or the reasoning behind a decision \u2014 expand the range:\n\nctx_expand(start=120, end=245) \u2190 the heading's start/end range\n\nReturns the raw transcript as [N] U:/A: lines, capped at ~15K tokens; an oversized range returns the head and tells you where to continue. Also works with ordinals from ctx_search message results \u2014 expand a window around a hit (e.g. start=N-10, end=N+5). Ranges after the last compartment are your live tail \u2014 already visible in context, not expandable.\n\nTwo recovery modes for finer detail:\n- ctx_expand(start=120, end=245, verbose=true) \u2014 lists each message SEPARATELY with its ordinal [N] and a per-part preview (each tool call shown with its output size). Use this to find the exact message or tool call you want, then recover it in full by ordinal.\n- ctx_expand(message=138) \u2014 returns the FULL untruncated content of the message at that ordinal: every text part, and every tool call's complete input + output, read from stored history. This is the cheap way to get back a tool output you dropped with ctx_reduce \u2014 the original is still in storage even though the wire shows [dropped \u00A7N\u00A7]. If the message was deleted from history (session prune/revert), it says so.";
|
|
2
2
|
export declare const CTX_EXPAND_TOKEN_BUDGET = 15000;
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,ipDAU6X,CAAC;AAEja,eAAO,MAAM,uBAAuB,QAAS,CAAC"}
|
|
@@ -15,8 +15,15 @@ export declare function loadSidebarSnapshot(sessionId: string, directory: string
|
|
|
15
15
|
export declare function loadStatusDetail(sessionId: string, directory: string, modelKey?: string): Promise<StatusDetail>;
|
|
16
16
|
/** Fetch embedding coverage status for `/ctx-embed` via RPC. */
|
|
17
17
|
export declare function loadEmbedDetail(sessionId: string, directory: string): Promise<EmbedDetail>;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
export type CompartmentCountResult = {
|
|
19
|
+
ok: true;
|
|
20
|
+
count: number;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
error: string;
|
|
24
|
+
};
|
|
25
|
+
/** Get compartment count without making transport failure look like a real zero. */
|
|
26
|
+
export declare function getCompartmentCount(sessionId: string): Promise<CompartmentCountResult>;
|
|
20
27
|
/** Send recomp request to server via RPC. */
|
|
21
28
|
export declare function requestRecomp(sessionId: string): Promise<boolean>;
|
|
22
29
|
/** Run `/ctx-session-upgrade` for the session (full recomp + once-per-project
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui/data/context-db.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAc3D,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;sCACsC;AACtC,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D;AAED,+BAA+B;AAC/B,wBAAgB,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6CAA6C;AAC7C,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQvE;AAED;mFACmF;AACnF,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQxE;AAED;;iDAEiD;AACjD,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUhF;AAED,gEAAgE;AAChE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ3D;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkBrE;AAED,wEAAwE;AACxE,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAQtD"}
|
|
@@ -26,14 +26,13 @@ export interface SocketNotification {
|
|
|
26
26
|
interface NotificationSocketOptions {
|
|
27
27
|
/** Current active session id (re-read cheaply to follow session switches). */
|
|
28
28
|
getSessionId: () => string | null;
|
|
29
|
-
/** Handle one delivered notification. Returns true
|
|
30
|
-
*
|
|
29
|
+
/** Handle one delivered notification. Returns true only after it is fully
|
|
30
|
+
* consumed and can be acknowledged. Async because dialog handlers await. */
|
|
31
31
|
onNotification: (notification: SocketNotification) => boolean | Promise<boolean>;
|
|
32
32
|
}
|
|
33
|
-
/** Open the persistent notification socket.
|
|
34
|
-
* is a no-op. Reconnects on its own after any drop. */
|
|
33
|
+
/** Open the persistent notification socket. Reconnects on its own after a drop. */
|
|
35
34
|
export declare function startNotificationSocket(options: NotificationSocketOptions): void;
|
|
36
|
-
/** Close the socket and
|
|
35
|
+
/** Close the socket and release all state owned by this TUI initialization. */
|
|
37
36
|
export declare function stopNotificationSocket(): void;
|
|
38
37
|
export declare function _resetNotificationSocketStateForTesting(): void;
|
|
39
38
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-socket.d.ts","sourceRoot":"","sources":["../../../src/tui/data/notification-socket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,yBAAyB;IAC/B,8EAA8E;IAC9E,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAClC
|
|
1
|
+
{"version":3,"file":"notification-socket.d.ts","sourceRoot":"","sources":["../../../src/tui/data/notification-socket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,yBAAyB;IAC/B,8EAA8E;IAC9E,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAClC;iFAC6E;IAC7E,cAAc,EAAE,CAAC,YAAY,EAAE,kBAAkB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpF;AA6CD,mFAAmF;AACnF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAOhF;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,IAAI,IAAI,CA+B7C;AAyUD,wBAAgB,uCAAuC,IAAI,IAAI,CAE9D"}
|
|
@@ -15,8 +15,15 @@ export declare function loadSidebarSnapshot(sessionId: string, directory: string
|
|
|
15
15
|
export declare function loadStatusDetail(sessionId: string, directory: string, modelKey?: string): Promise<StatusDetail>;
|
|
16
16
|
/** Fetch embedding coverage status for `/ctx-embed` via RPC. */
|
|
17
17
|
export declare function loadEmbedDetail(sessionId: string, directory: string): Promise<EmbedDetail>;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
export type CompartmentCountResult = {
|
|
19
|
+
ok: true;
|
|
20
|
+
count: number;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
error: string;
|
|
24
|
+
};
|
|
25
|
+
/** Get compartment count without making transport failure look like a real zero. */
|
|
26
|
+
export declare function getCompartmentCount(sessionId: string): Promise<CompartmentCountResult>;
|
|
20
27
|
/** Send recomp request to server via RPC. */
|
|
21
28
|
export declare function requestRecomp(sessionId: string): Promise<boolean>;
|
|
22
29
|
/** Run `/ctx-session-upgrade` for the session (full recomp + once-per-project
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/context-db.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAc3D,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;sCACsC;AACtC,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,IAAI,IAAI,CAM/B;
|
|
1
|
+
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/context-db.ts"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ACmF;AACnF,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQxE;AAED;;iDAEiD;AACjD,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUhF;AAED,gEAAgE;AAChE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ3D;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkBrE;AAED,wEAAwE;AACxE,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAQtD"}
|
|
@@ -26,14 +26,13 @@ export interface SocketNotification {
|
|
|
26
26
|
interface NotificationSocketOptions {
|
|
27
27
|
/** Current active session id (re-read cheaply to follow session switches). */
|
|
28
28
|
getSessionId: () => string | null;
|
|
29
|
-
/** Handle one delivered notification. Returns true
|
|
30
|
-
*
|
|
29
|
+
/** Handle one delivered notification. Returns true only after it is fully
|
|
30
|
+
* consumed and can be acknowledged. Async because dialog handlers await. */
|
|
31
31
|
onNotification: (notification: SocketNotification) => boolean | Promise<boolean>;
|
|
32
32
|
}
|
|
33
|
-
/** Open the persistent notification socket.
|
|
34
|
-
* is a no-op. Reconnects on its own after any drop. */
|
|
33
|
+
/** Open the persistent notification socket. Reconnects on its own after a drop. */
|
|
35
34
|
export declare function startNotificationSocket(options: NotificationSocketOptions): void;
|
|
36
|
-
/** Close the socket and
|
|
35
|
+
/** Close the socket and release all state owned by this TUI initialization. */
|
|
37
36
|
export declare function stopNotificationSocket(): void;
|
|
38
37
|
export declare function _resetNotificationSocketStateForTesting(): void;
|
|
39
38
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-socket.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/notification-socket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,yBAAyB;IAC/B,8EAA8E;IAC9E,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAClC
|
|
1
|
+
{"version":3,"file":"notification-socket.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/notification-socket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,yBAAyB;IAC/B,8EAA8E;IAC9E,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAClC;iFAC6E;IAC7E,cAAc,EAAE,CAAC,YAAY,EAAE,kBAAkB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpF;AA6CD,mFAAmF;AACnF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAOhF;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,IAAI,IAAI,CA+B7C;AAyUD,wBAAgB,uCAAuC,IAAI,IAAI,CAE9D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-magic-context",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"prepublishOnly": "bun run build && bun run build:tui"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
+
"@cortexkit/subc-client": "0.4.1",
|
|
46
47
|
"@huggingface/transformers": "^4.1.0",
|
|
47
48
|
"@jitl/quickjs-singlefile-cjs-release-asyncify": "0.32.0",
|
|
48
49
|
"@opencode-ai/plugin": "^1.17.11",
|