@ponythewhite/base-context 1.0.14 → 1.0.15
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/CHANGELOG.md +9 -0
- package/dist/base-context-runtime/pyproject.toml +1 -1
- package/dist/base-context-runtime/uv.lock +1 -1
- package/dist/build-info.json +1 -1
- package/dist/bundle/{bundled-modules-UODO7ZR7.js → bundled-modules-O67MEO74.js} +2 -2
- package/dist/bundle/{chunk-NLRWERWA.js → chunk-DGO66I3L.js} +51 -20
- package/dist/bundle/{chunk-SX7CAXWU.js → chunk-RQFC34FM.js} +131 -49
- package/dist/bundle/{cli-main-6GXXIMQQ.js → cli-main-2RER6PBE.js} +2 -2
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{main-HF64B4HM.js → main-YERLD3T4.js} +2 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +36 -24
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +11 -9
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/inference-coordinator.d.ts.map +1 -1
- package/dist/core/inference-coordinator.js +13 -2
- package/dist/core/inference-coordinator.js.map +1 -1
- package/dist/core/kernel/repl-manager.d.ts.map +1 -1
- package/dist/core/kernel/repl-manager.js +5 -0
- package/dist/core/kernel/repl-manager.js.map +1 -1
- package/dist/core/session-manager.d.ts +8 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +57 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-mode.js +17 -17
- package/dist/modes/daemon/daemon-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-worker-client.d.ts +1 -0
- package/dist/modes/daemon/daemon-worker-client.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-worker-client.js +8 -0
- package/dist/modes/daemon/daemon-worker-client.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +29 -4
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/upstream-1.0.15.md +83 -0
- package/package.json +4 -4
|
@@ -6383,6 +6383,10 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6383
6383
|
if (!state || !state.clients.has(client)) {
|
|
6384
6384
|
continue;
|
|
6385
6385
|
}
|
|
6386
|
+
const streamsSnapshot = client.transport === "private-framed" &&
|
|
6387
|
+
daemonClientCapabilitiesForSession(client, activeSessionId).has("chunked_snapshot");
|
|
6388
|
+
const snapshotSignal = streamsSnapshot ? markClientSnapshotStreaming(client, activeSessionId) : undefined;
|
|
6389
|
+
let ownsSnapshot = streamsSnapshot;
|
|
6386
6390
|
try {
|
|
6387
6391
|
const result = await this.createAttachResult(client, state, {
|
|
6388
6392
|
type: "attach",
|
|
@@ -6391,8 +6395,7 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6391
6395
|
if (this.sessions.get(activeSessionId) !== state || !state.clients.has(client)) {
|
|
6392
6396
|
continue;
|
|
6393
6397
|
}
|
|
6394
|
-
if (
|
|
6395
|
-
daemonClientCapabilitiesForSession(client, activeSessionId).has("chunked_snapshot")) {
|
|
6398
|
+
if (snapshotSignal) {
|
|
6396
6399
|
if (purpose === "replacement") {
|
|
6397
6400
|
this.write(client, {
|
|
6398
6401
|
type: "session_replaced",
|
|
@@ -6404,21 +6407,14 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6404
6407
|
});
|
|
6405
6408
|
}
|
|
6406
6409
|
const snapshotId = `${result.activeSessionId}-${result.lastEventCursor?.generation}-${result.lastEventSequence}`;
|
|
6407
|
-
const
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
signal: snapshotSignal,
|
|
6416
|
-
});
|
|
6417
|
-
}
|
|
6418
|
-
catch (error) {
|
|
6419
|
-
finishClientSnapshotStreaming(client, activeSessionId);
|
|
6420
|
-
throw error;
|
|
6421
|
-
}
|
|
6410
|
+
const transcript = createSnapshotTranscriptChunks({
|
|
6411
|
+
activeSessionId,
|
|
6412
|
+
snapshotId,
|
|
6413
|
+
messages: result.snapshot.messages,
|
|
6414
|
+
targetChunkBytes: SNAPSHOT_TARGET_CHUNK_BYTES,
|
|
6415
|
+
signal: snapshotSignal,
|
|
6416
|
+
});
|
|
6417
|
+
ownsSnapshot = false;
|
|
6422
6418
|
await this.streamWorkerSnapshot(client, {
|
|
6423
6419
|
...result,
|
|
6424
6420
|
messages: result.messages ? [] : undefined,
|
|
@@ -6456,6 +6452,10 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6456
6452
|
this.scheduleClientCatchupRetry(client);
|
|
6457
6453
|
return "retry-later";
|
|
6458
6454
|
}
|
|
6455
|
+
finally {
|
|
6456
|
+
if (ownsSnapshot)
|
|
6457
|
+
finishClientSnapshotStreaming(client, activeSessionId);
|
|
6458
|
+
}
|
|
6459
6459
|
}
|
|
6460
6460
|
return "drained";
|
|
6461
6461
|
}
|