opencode-muse 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +121 -2
- package/dist/catalog.d.ts +47 -0
- package/dist/catalog.js +159 -0
- package/dist/errors.d.ts +92 -0
- package/dist/errors.js +181 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +17 -0
- package/dist/model/agent-context.d.ts +10 -0
- package/dist/model/agent-context.js +35 -0
- package/dist/model/context.d.ts +26 -0
- package/dist/model/context.js +87 -0
- package/dist/model/language-model.d.ts +48 -0
- package/dist/model/language-model.js +540 -0
- package/dist/model/meta.d.ts +16 -0
- package/dist/model/meta.js +171 -0
- package/dist/model/prompt.d.ts +68 -0
- package/dist/model/prompt.js +175 -0
- package/dist/model/stream.d.ts +46 -0
- package/dist/model/stream.js +235 -0
- package/dist/msp/client.d.ts +49 -0
- package/dist/msp/client.js +229 -0
- package/dist/msp/host.d.ts +55 -0
- package/dist/msp/host.js +173 -0
- package/dist/provider.d.ts +18 -0
- package/dist/provider.js +112 -0
- package/dist/session/fingerprint.d.ts +9 -0
- package/dist/session/fingerprint.js +83 -0
- package/dist/session/manager.d.ts +40 -0
- package/dist/session/manager.js +353 -0
- package/dist/session/registry.d.ts +55 -0
- package/dist/session/registry.js +383 -0
- package/dist/session/workspace-lock.d.ts +26 -0
- package/dist/session/workspace-lock.js +288 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.js +1 -0
- package/package.json +58 -4
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { MspHost } from "../msp/host.js";
|
|
5
|
+
import { MspCommandRejectedError, MuseRecoveryChoiceRequiredError, MuseUnsupportedRequestError, RegistryWorkspaceMismatchError, } from "../errors.js";
|
|
6
|
+
function canonicalWorkspacePath(directory) {
|
|
7
|
+
const absolute = resolve(directory);
|
|
8
|
+
return existsSync(absolute) ? realpathSync(absolute) : absolute;
|
|
9
|
+
}
|
|
10
|
+
export function workspaceFingerprint(directory) {
|
|
11
|
+
return createHash("sha256").update(canonicalWorkspacePath(directory)).digest("hex");
|
|
12
|
+
}
|
|
13
|
+
function sessionIdFrom(result) {
|
|
14
|
+
const session = result.session;
|
|
15
|
+
return typeof session?.sessionId === "string" ? session.sessionId : undefined;
|
|
16
|
+
}
|
|
17
|
+
function cursorFrom(result) {
|
|
18
|
+
return typeof result.viewCursor === "string" ? result.viewCursor : undefined;
|
|
19
|
+
}
|
|
20
|
+
function modelSelection(context) {
|
|
21
|
+
return {
|
|
22
|
+
providerId: context.museSelection.providerId,
|
|
23
|
+
modelId: context.museSelection.modelId,
|
|
24
|
+
profileId: context.museSelection.profileId,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function selectionMatches(entry, selected) {
|
|
28
|
+
return entry.providerId === selected.providerId
|
|
29
|
+
&& entry.modelId === selected.modelId
|
|
30
|
+
&& (entry.profileId ?? null) === selected.profileId;
|
|
31
|
+
}
|
|
32
|
+
export class MuseSessionManager {
|
|
33
|
+
options;
|
|
34
|
+
bindings = new Map();
|
|
35
|
+
contextBySession = new Map();
|
|
36
|
+
createHost;
|
|
37
|
+
closed = false;
|
|
38
|
+
constructor(options) {
|
|
39
|
+
this.options = options;
|
|
40
|
+
this.createHost = options.createHost ?? (async ({ museBin, cwd, args, capabilities }) => MspHost.start({
|
|
41
|
+
museBin,
|
|
42
|
+
cwd,
|
|
43
|
+
args,
|
|
44
|
+
capabilities,
|
|
45
|
+
startupTimeoutMs: 20_000,
|
|
46
|
+
commandTimeoutMs: 30_000,
|
|
47
|
+
requestTimeoutMs: 20_000,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
setContextForSession(openCodeSessionId, context) {
|
|
51
|
+
this.contextBySession.set(openCodeSessionId, {
|
|
52
|
+
supported: context.supported,
|
|
53
|
+
fragments: context.fragments.map((fragment) => ({ ...fragment })),
|
|
54
|
+
});
|
|
55
|
+
const binding = this.bindings.get(openCodeSessionId);
|
|
56
|
+
if (binding) {
|
|
57
|
+
binding.contextAllowlist = context.supported ? context.fragments.map((fragment) => ({ ...fragment })) : [];
|
|
58
|
+
binding.contextError = context.supported ? undefined : "agent-instructions-unrepresentable";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async resolveSession(context) {
|
|
62
|
+
if (this.closed)
|
|
63
|
+
throw new MuseUnsupportedRequestError("plugin-closed");
|
|
64
|
+
if (context.kind !== "primary")
|
|
65
|
+
throw new MuseUnsupportedRequestError(context.kind);
|
|
66
|
+
const canonicalDirectory = canonicalWorkspacePath(context.directory);
|
|
67
|
+
const fingerprint = workspaceFingerprint(canonicalDirectory);
|
|
68
|
+
const selected = modelSelection(context);
|
|
69
|
+
const existingBinding = this.bindings.get(context.sessionID);
|
|
70
|
+
if (existingBinding && existingBinding.workspaceFingerprint !== fingerprint) {
|
|
71
|
+
throw new RegistryWorkspaceMismatchError();
|
|
72
|
+
}
|
|
73
|
+
const lease = await this.options.workspaceLock.acquire(fingerprint, context.sessionID);
|
|
74
|
+
let host;
|
|
75
|
+
try {
|
|
76
|
+
const stored = await this.options.registry.get(context.sessionID, fingerprint);
|
|
77
|
+
if (stored && (Object.keys(stored.pendingCommands).length > 0 || stored.activeTurnId !== undefined)) {
|
|
78
|
+
throw new MuseRecoveryChoiceRequiredError();
|
|
79
|
+
}
|
|
80
|
+
if (existingBinding) {
|
|
81
|
+
existingBinding.lease = lease;
|
|
82
|
+
try {
|
|
83
|
+
await this.applySelectionIfChanged(existingBinding, selected);
|
|
84
|
+
await this.persistBinding(context.sessionID, existingBinding);
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
existingBinding.lease = undefined;
|
|
88
|
+
await lease.release();
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
return existingBinding;
|
|
92
|
+
}
|
|
93
|
+
host = await this.createHost({
|
|
94
|
+
museBin: this.options.museBin,
|
|
95
|
+
cwd: canonicalDirectory,
|
|
96
|
+
args: ["serve", "--provider", stored?.providerId ?? selected.providerId],
|
|
97
|
+
capabilities: { userInputDialogs: false },
|
|
98
|
+
});
|
|
99
|
+
const durability = host.initializeResult.sessionDurability;
|
|
100
|
+
if (stored && durability === "ephemeral")
|
|
101
|
+
throw new MuseRecoveryChoiceRequiredError();
|
|
102
|
+
let museSessionId;
|
|
103
|
+
let viewCursor;
|
|
104
|
+
let replayAfterCursor;
|
|
105
|
+
if (stored && durability !== "ephemeral") {
|
|
106
|
+
const resumed = await host.command("session/resume", {
|
|
107
|
+
commandId: host.mintCommandId(),
|
|
108
|
+
sessionId: stored.museSessionId,
|
|
109
|
+
...(stored.viewCursor ? { cursor: stored.viewCursor } : {}),
|
|
110
|
+
});
|
|
111
|
+
const resumedSession = resumed.session;
|
|
112
|
+
if (!resumedSession || !Object.hasOwn(resumedSession, "activeTurnId") || resumedSession.activeTurnId !== null) {
|
|
113
|
+
throw new MuseRecoveryChoiceRequiredError();
|
|
114
|
+
}
|
|
115
|
+
museSessionId = sessionIdFrom(resumed) ?? stored.museSessionId;
|
|
116
|
+
viewCursor = cursorFrom(resumed);
|
|
117
|
+
// session/resume attaches at its returned head; avoid a redundant
|
|
118
|
+
// view/subscribe at that same cursor. Task 12 owns older-cursor replay.
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const start = await host.command("session/start", {
|
|
122
|
+
commandId: host.mintCommandId(),
|
|
123
|
+
workspaceRoot: canonicalDirectory,
|
|
124
|
+
providerId: selected.providerId,
|
|
125
|
+
modelId: selected.modelId,
|
|
126
|
+
});
|
|
127
|
+
const startedSessionId = sessionIdFrom(start);
|
|
128
|
+
if (!startedSessionId)
|
|
129
|
+
throw new MuseRecoveryChoiceRequiredError();
|
|
130
|
+
museSessionId = startedSessionId;
|
|
131
|
+
viewCursor = cursorFrom(start);
|
|
132
|
+
}
|
|
133
|
+
const initialSelection = stored
|
|
134
|
+
? { providerId: stored.providerId ?? selected.providerId, modelId: stored.modelId ?? selected.modelId, profileId: stored.profileId ?? null }
|
|
135
|
+
: { providerId: selected.providerId, modelId: selected.modelId, profileId: null };
|
|
136
|
+
const sessionContext = this.contextBySession.get(context.sessionID);
|
|
137
|
+
const binding = {
|
|
138
|
+
host,
|
|
139
|
+
sessionId: museSessionId,
|
|
140
|
+
museSessionId,
|
|
141
|
+
hostId: randomUUID(),
|
|
142
|
+
workspaceFingerprint: fingerprint,
|
|
143
|
+
viewCursor,
|
|
144
|
+
replayAfterCursor,
|
|
145
|
+
currentSelection: initialSelection,
|
|
146
|
+
previousTranscriptFingerprints: stored?.transcriptFingerprints ?? [],
|
|
147
|
+
transcriptFingerprints: stored?.transcriptFingerprints ?? [],
|
|
148
|
+
compactionFingerprints: stored?.compactionFingerprints ?? [],
|
|
149
|
+
pendingCommands: stored?.pendingCommands ?? {},
|
|
150
|
+
contextAllowlist: sessionContext?.supported ? sessionContext.fragments.map((fragment) => ({ ...fragment })) : [],
|
|
151
|
+
contextError: sessionContext?.supported ? undefined : "agent-instructions-unrepresentable",
|
|
152
|
+
lease,
|
|
153
|
+
async recordPendingCommand(input) {
|
|
154
|
+
binding.pendingCommands[input.commandId] = { method: input.method, fingerprint: input.fingerprint };
|
|
155
|
+
await managerOptions.registry.recordPendingCommand(context.sessionID, fingerprint, input);
|
|
156
|
+
},
|
|
157
|
+
async clearPendingCommand(commandId) {
|
|
158
|
+
await managerOptions.registry.clearPendingCommand(context.sessionID, fingerprint, commandId);
|
|
159
|
+
delete binding.pendingCommands[commandId];
|
|
160
|
+
},
|
|
161
|
+
async recordTurnAccepted(_commandId, turnId) {
|
|
162
|
+
const previous = binding.activeTurnId;
|
|
163
|
+
binding.activeTurnId = turnId;
|
|
164
|
+
try {
|
|
165
|
+
await persist();
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
binding.activeTurnId = previous;
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
async updateCursor(cursor) {
|
|
173
|
+
const previous = binding.viewCursor;
|
|
174
|
+
binding.viewCursor = cursor;
|
|
175
|
+
try {
|
|
176
|
+
await managerOptions.registry.updateCursor(context.sessionID, fingerprint, cursor);
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
// Retaining the older durable cursor is safe: the next resume will
|
|
180
|
+
// replay this suffix. Do not abandon an active turn because a
|
|
181
|
+
// per-event cursor write temporarily failed.
|
|
182
|
+
binding.viewCursor = previous;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
async recordTurnCompleted(_turnId, _terminal) {
|
|
186
|
+
const previousActive = binding.activeTurnId;
|
|
187
|
+
const previousPending = binding.pendingCommands;
|
|
188
|
+
binding.activeTurnId = undefined;
|
|
189
|
+
binding.replayAfterCursor = undefined;
|
|
190
|
+
binding.pendingCommands = {};
|
|
191
|
+
try {
|
|
192
|
+
await persist();
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
binding.activeTurnId = previousActive;
|
|
196
|
+
binding.pendingCommands = previousPending;
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
async release() {
|
|
201
|
+
const currentLease = binding.lease;
|
|
202
|
+
binding.lease = undefined;
|
|
203
|
+
await currentLease?.release();
|
|
204
|
+
},
|
|
205
|
+
async commitTranscriptFingerprints(fingerprints) {
|
|
206
|
+
const previousTranscript = binding.transcriptFingerprints;
|
|
207
|
+
const previousFingerprints = binding.previousTranscriptFingerprints;
|
|
208
|
+
const previousCompactions = binding.compactionFingerprints;
|
|
209
|
+
binding.transcriptFingerprints = [...fingerprints];
|
|
210
|
+
binding.previousTranscriptFingerprints = [...fingerprints];
|
|
211
|
+
binding.compactionFingerprints = [];
|
|
212
|
+
try {
|
|
213
|
+
await persist();
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
binding.transcriptFingerprints = [...previousTranscript];
|
|
217
|
+
binding.previousTranscriptFingerprints = [...previousFingerprints];
|
|
218
|
+
binding.compactionFingerprints = [...previousCompactions];
|
|
219
|
+
throw error;
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
const managerOptions = this.options;
|
|
224
|
+
const persist = async () => {
|
|
225
|
+
await this.persistBinding(context.sessionID, binding);
|
|
226
|
+
};
|
|
227
|
+
this.bindingSessionIDs.set(binding, context.sessionID);
|
|
228
|
+
this.bindings.set(context.sessionID, binding);
|
|
229
|
+
await persist();
|
|
230
|
+
await this.applySelectionIfChanged(binding, selected, stored);
|
|
231
|
+
await persist();
|
|
232
|
+
return binding;
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
await lease.release();
|
|
236
|
+
if (host)
|
|
237
|
+
await host.close().catch(() => { });
|
|
238
|
+
throw error;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async close() {
|
|
242
|
+
if (this.closed)
|
|
243
|
+
return;
|
|
244
|
+
this.closed = true;
|
|
245
|
+
const bindings = [...this.bindings.values()];
|
|
246
|
+
this.bindings.clear();
|
|
247
|
+
await Promise.all(bindings.map(async (binding) => {
|
|
248
|
+
try {
|
|
249
|
+
await binding.host.close?.();
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
// The diagnostic may include CLI stderr; shutdown must still release
|
|
253
|
+
// the local lease once the owned process has been asked to stop.
|
|
254
|
+
}
|
|
255
|
+
finally {
|
|
256
|
+
await binding.release?.().catch(() => { });
|
|
257
|
+
}
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
async recordCompactionCandidate(openCodeSessionId, fingerprint) {
|
|
261
|
+
const binding = this.bindings.get(openCodeSessionId);
|
|
262
|
+
if (binding) {
|
|
263
|
+
const lease = await this.options.workspaceLock.acquire(binding.workspaceFingerprint, openCodeSessionId);
|
|
264
|
+
try {
|
|
265
|
+
binding.compactionFingerprints = [fingerprint];
|
|
266
|
+
await this.persistBinding(openCodeSessionId, binding);
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
await lease.release();
|
|
270
|
+
}
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const stored = await this.options.registry.getForOpenCodeSession(openCodeSessionId);
|
|
274
|
+
if (!stored)
|
|
275
|
+
return;
|
|
276
|
+
const lease = await this.options.workspaceLock.acquire(stored.workspaceFingerprint, openCodeSessionId);
|
|
277
|
+
try {
|
|
278
|
+
await this.options.registry.recordCompactionCandidate(openCodeSessionId, fingerprint);
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
await lease.release();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async applySelectionIfChanged(binding, selected, stored) {
|
|
285
|
+
const currentMatches = stored
|
|
286
|
+
? selectionMatches(stored, selected)
|
|
287
|
+
: binding.currentSelection.providerId === selected.providerId
|
|
288
|
+
&& binding.currentSelection.modelId === selected.modelId
|
|
289
|
+
&& binding.currentSelection.profileId === selected.profileId;
|
|
290
|
+
if (currentMatches) {
|
|
291
|
+
binding.currentSelection = selected;
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const commandId = binding.host.mintCommandId();
|
|
295
|
+
const method = "session/setModel";
|
|
296
|
+
const params = {
|
|
297
|
+
commandId,
|
|
298
|
+
sessionId: binding.sessionId,
|
|
299
|
+
model: selected,
|
|
300
|
+
};
|
|
301
|
+
const commandFingerprint = createHash("sha256").update(JSON.stringify({ method, params })).digest("hex");
|
|
302
|
+
const openCodeSessionId = this.openCodeSessionIdFor(binding);
|
|
303
|
+
const pending = { method, fingerprint: commandFingerprint };
|
|
304
|
+
binding.pendingCommands[commandId] = pending;
|
|
305
|
+
try {
|
|
306
|
+
await this.options.registry.recordPendingCommand(openCodeSessionId, binding.workspaceFingerprint, {
|
|
307
|
+
commandId,
|
|
308
|
+
...pending,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
catch (error) {
|
|
312
|
+
delete binding.pendingCommands[commandId];
|
|
313
|
+
throw error;
|
|
314
|
+
}
|
|
315
|
+
try {
|
|
316
|
+
await binding.host.command(method, params);
|
|
317
|
+
}
|
|
318
|
+
catch (error) {
|
|
319
|
+
if (error instanceof MspCommandRejectedError) {
|
|
320
|
+
await this.options.registry.clearPendingCommand(openCodeSessionId, binding.workspaceFingerprint, commandId);
|
|
321
|
+
delete binding.pendingCommands[commandId];
|
|
322
|
+
}
|
|
323
|
+
throw error;
|
|
324
|
+
}
|
|
325
|
+
await this.options.registry.clearPendingCommand(openCodeSessionId, binding.workspaceFingerprint, commandId);
|
|
326
|
+
delete binding.pendingCommands[commandId];
|
|
327
|
+
binding.currentSelection = selected;
|
|
328
|
+
await this.persistBinding(openCodeSessionId, binding);
|
|
329
|
+
}
|
|
330
|
+
bindingSessionIDs = new WeakMap();
|
|
331
|
+
openCodeSessionIdFor(binding) {
|
|
332
|
+
const sessionId = this.bindingSessionIDs.get(binding);
|
|
333
|
+
if (!sessionId)
|
|
334
|
+
throw new MuseRecoveryChoiceRequiredError();
|
|
335
|
+
return sessionId;
|
|
336
|
+
}
|
|
337
|
+
async persistBinding(openCodeSessionId, binding) {
|
|
338
|
+
await this.options.registry.put({
|
|
339
|
+
openCodeSessionId,
|
|
340
|
+
museSessionId: binding.museSessionId,
|
|
341
|
+
hostId: binding.hostId,
|
|
342
|
+
workspaceFingerprint: binding.workspaceFingerprint,
|
|
343
|
+
providerId: binding.currentSelection.providerId,
|
|
344
|
+
...(binding.currentSelection.profileId !== null ? { profileId: binding.currentSelection.profileId } : {}),
|
|
345
|
+
modelId: binding.currentSelection.modelId,
|
|
346
|
+
...(binding.viewCursor ? { viewCursor: binding.viewCursor } : {}),
|
|
347
|
+
...(binding.activeTurnId ? { activeTurnId: binding.activeTurnId } : {}),
|
|
348
|
+
transcriptFingerprints: binding.transcriptFingerprints,
|
|
349
|
+
compactionFingerprints: binding.compactionFingerprints,
|
|
350
|
+
pendingCommands: binding.pendingCommands,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface PendingCommandRecord {
|
|
2
|
+
method: string;
|
|
3
|
+
fingerprint: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SessionRegistryEntry {
|
|
6
|
+
openCodeSessionId: string;
|
|
7
|
+
museSessionId: string;
|
|
8
|
+
hostId: string;
|
|
9
|
+
workspaceFingerprint: string;
|
|
10
|
+
providerId?: string;
|
|
11
|
+
modelId?: string;
|
|
12
|
+
profileId?: string;
|
|
13
|
+
viewCursor?: string;
|
|
14
|
+
activeTurnId?: string;
|
|
15
|
+
transcriptFingerprints: string[];
|
|
16
|
+
compactionFingerprints: string[];
|
|
17
|
+
pendingCommands: Record<string, PendingCommandRecord>;
|
|
18
|
+
updatedAt: number;
|
|
19
|
+
}
|
|
20
|
+
export type SessionRegistryEntryInput = Omit<SessionRegistryEntry, "updatedAt">;
|
|
21
|
+
export interface ResolveStateDirectoryOptions {
|
|
22
|
+
env?: NodeJS.ProcessEnv;
|
|
23
|
+
homeDirectory?: string;
|
|
24
|
+
platform?: NodeJS.Platform | "win32";
|
|
25
|
+
}
|
|
26
|
+
export interface SessionRegistryOptions extends ResolveStateDirectoryOptions {
|
|
27
|
+
stateDirectory?: string;
|
|
28
|
+
now?: () => number;
|
|
29
|
+
}
|
|
30
|
+
/** Refuse a caller-selected state root inside Muse's CLI-owned config directory. */
|
|
31
|
+
export declare function assertSafeStateDirectory(path: string, options?: ResolveStateDirectoryOptions): string;
|
|
32
|
+
export declare class SessionRegistry {
|
|
33
|
+
private readonly directory;
|
|
34
|
+
private readonly now;
|
|
35
|
+
constructor(options?: SessionRegistryOptions);
|
|
36
|
+
static resolveStateDirectory(options?: ResolveStateDirectoryOptions): string;
|
|
37
|
+
get(openCodeSessionId: string, workspaceFingerprint: string): Promise<SessionRegistryEntry | undefined>;
|
|
38
|
+
getForOpenCodeSession(openCodeSessionId: string): Promise<SessionRegistryEntry | undefined>;
|
|
39
|
+
recordCompactionCandidate(openCodeSessionId: string, fingerprint: string): Promise<void>;
|
|
40
|
+
clearCompactionCandidate(openCodeSessionId: string, fingerprint: string): Promise<void>;
|
|
41
|
+
private readEntry;
|
|
42
|
+
put(input: SessionRegistryEntryInput): Promise<SessionRegistryEntry>;
|
|
43
|
+
updateCursor(openCodeSessionId: string, workspaceFingerprint: string, viewCursor: string): Promise<void>;
|
|
44
|
+
recordPendingCommand(openCodeSessionId: string, workspaceFingerprint: string, pending: {
|
|
45
|
+
commandId: string;
|
|
46
|
+
method: string;
|
|
47
|
+
fingerprint: string;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
clearPendingCommand(openCodeSessionId: string, workspaceFingerprint: string, commandId: string): Promise<void>;
|
|
50
|
+
private requireEntry;
|
|
51
|
+
private assertLookup;
|
|
52
|
+
private entryPath;
|
|
53
|
+
private write;
|
|
54
|
+
private quarantine;
|
|
55
|
+
}
|