@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.15] - 2026-09-28
|
|
4
|
+
|
|
5
|
+
- Fixed compaction of long-lived sessions by selecting the active canonical context before source hydration. This covers manual, agent-requested, threshold, and overflow-recovery compaction without increasing source limits.
|
|
6
|
+
- Fixed Codex HTTP retries losing native context acknowledgement after retryable failures. Only an unchanged prepared request can reuse its acknowledged epoch.
|
|
7
|
+
- Changed `/goal stop` and `/goal clear` to acknowledge the goal that was cleared instead of reporting only the resulting idle state.
|
|
8
|
+
- Fixed daemon worker connection retries retaining failed socket and channel references.
|
|
9
|
+
- Handled Python kernel stderr stream errors through the existing kernel error path.
|
|
10
|
+
- Fixed the goal status display being overwritten by delayed state reads and streamed catch-up snapshots.
|
|
11
|
+
|
|
3
12
|
## [1.0.14] - 2026-09-23
|
|
4
13
|
|
|
5
14
|
- Fixed compaction recovery after failed or interrupted partial tool calls, including resuming affected saved sessions without exposing failed replies to the provider.
|
package/dist/build-info.json
CHANGED
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
oauth_exports,
|
|
52
52
|
runPrintMode,
|
|
53
53
|
runRpcMode
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-DGO66I3L.js";
|
|
55
55
|
import {
|
|
56
56
|
AgentSession,
|
|
57
57
|
CURRENT_SESSION_VERSION,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
withFileMutationQueue,
|
|
144
144
|
wrapRegisteredTool,
|
|
145
145
|
wrapRegisteredTools
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-RQFC34FM.js";
|
|
147
147
|
import "./chunk-CFNASUYO.js";
|
|
148
148
|
import "./chunk-V6LOBH6X.js";
|
|
149
149
|
import {
|
|
@@ -352,7 +352,7 @@ import {
|
|
|
352
352
|
watchWithErrorHandler,
|
|
353
353
|
workerRosterEntryFromSummary,
|
|
354
354
|
wrapTextWithAnsi
|
|
355
|
-
} from "./chunk-
|
|
355
|
+
} from "./chunk-RQFC34FM.js";
|
|
356
356
|
import {
|
|
357
357
|
array,
|
|
358
358
|
boolean,
|
|
@@ -17249,6 +17249,7 @@ var DaemonWorkerClient = class {
|
|
|
17249
17249
|
await new Promise((resolve26, reject) => {
|
|
17250
17250
|
const timeout = setTimeout(() => {
|
|
17251
17251
|
cleanup();
|
|
17252
|
+
this.clearSocketReference(socket);
|
|
17252
17253
|
socket.destroy();
|
|
17253
17254
|
reject(new Error(`Timed out connecting to daemon worker socket: ${this.socketPath}`));
|
|
17254
17255
|
}, timeoutMs);
|
|
@@ -17263,6 +17264,7 @@ var DaemonWorkerClient = class {
|
|
|
17263
17264
|
};
|
|
17264
17265
|
const onError = (error) => {
|
|
17265
17266
|
cleanup();
|
|
17267
|
+
this.clearSocketReference(socket);
|
|
17266
17268
|
reject(error);
|
|
17267
17269
|
};
|
|
17268
17270
|
socket.once("connect", onConnect);
|
|
@@ -17476,6 +17478,12 @@ var DaemonWorkerClient = class {
|
|
|
17476
17478
|
waiter.reject(error);
|
|
17477
17479
|
}
|
|
17478
17480
|
}
|
|
17481
|
+
clearSocketReference(socket) {
|
|
17482
|
+
if (this.socket !== socket)
|
|
17483
|
+
return;
|
|
17484
|
+
this.socket = void 0;
|
|
17485
|
+
this.channel = void 0;
|
|
17486
|
+
}
|
|
17479
17487
|
notifyClosed(socket, error) {
|
|
17480
17488
|
if (this.socket !== socket) {
|
|
17481
17489
|
return;
|
|
@@ -50506,13 +50514,16 @@ ${warningLines}`, 0, 0));
|
|
|
50506
50514
|
}
|
|
50507
50515
|
async refreshConnectionCatalog() {
|
|
50508
50516
|
this.invalidateConnectionModelRefresh();
|
|
50517
|
+
const read = this.captureConnectionStateRead();
|
|
50509
50518
|
const [state, commands, modelCatalog, resources] = await Promise.all([
|
|
50510
50519
|
this.agentConnection.getState(),
|
|
50511
50520
|
this.agentConnection.getCommands().catch(() => []),
|
|
50512
50521
|
this.agentConnection.getModelCatalog(),
|
|
50513
50522
|
this.agentConnection.getResourceSnapshot()
|
|
50514
50523
|
]);
|
|
50515
|
-
this.
|
|
50524
|
+
if (!this.isConnectionStateReadCurrent(read))
|
|
50525
|
+
return;
|
|
50526
|
+
this.applyConnectionStateSnapshot(state, read);
|
|
50516
50527
|
this.connectionCommands = commands;
|
|
50517
50528
|
this.applyConnectionModelCatalog(modelCatalog);
|
|
50518
50529
|
this.connectionModelsFetchedAt = Date.now();
|
|
@@ -50549,7 +50560,21 @@ ${warningLines}`, 0, 0));
|
|
|
50549
50560
|
getScopedHeartbeats() {
|
|
50550
50561
|
return scopeHeartbeatsToSession(this.heartbeatCatalog, this.connectionState, this.subagentSnapshots.values());
|
|
50551
50562
|
}
|
|
50552
|
-
|
|
50563
|
+
captureConnectionStateRead() {
|
|
50564
|
+
return {
|
|
50565
|
+
connection: this.agentConnection,
|
|
50566
|
+
generation: this.sessionEventGeneration,
|
|
50567
|
+
goal: this.connectionState?.goal
|
|
50568
|
+
};
|
|
50569
|
+
}
|
|
50570
|
+
isConnectionStateReadCurrent(read) {
|
|
50571
|
+
return read.connection === this.agentConnection && read.generation === this.sessionEventGeneration;
|
|
50572
|
+
}
|
|
50573
|
+
applyConnectionStateSnapshot(state, read) {
|
|
50574
|
+
const current = this.connectionState;
|
|
50575
|
+
if (read && current?.sessionId === state.sessionId && current.goal !== read.goal) {
|
|
50576
|
+
state = { ...state, goal: current.goal };
|
|
50577
|
+
}
|
|
50553
50578
|
this.bindPromptStashSession(state.sessionId);
|
|
50554
50579
|
this.connectionState = state;
|
|
50555
50580
|
this.scheduleHeartbeatManagerRefresh();
|
|
@@ -53800,13 +53825,16 @@ ${message}`, ["Yes", "No"], opts);
|
|
|
53800
53825
|
this.ui.requestRender();
|
|
53801
53826
|
}
|
|
53802
53827
|
async renderInitialMessages() {
|
|
53828
|
+
const read = this.captureConnectionStateRead();
|
|
53803
53829
|
const snapshot = await this.agentConnection.getInitialSnapshot();
|
|
53830
|
+
if (!this.isConnectionStateReadCurrent(read))
|
|
53831
|
+
return;
|
|
53804
53832
|
const context = this.getSessionContextFromConnectionSnapshot(snapshot);
|
|
53805
53833
|
const state = snapshot.state;
|
|
53806
53834
|
const streamingMessage = snapshot.streamingMessage;
|
|
53807
53835
|
this.rlmNodeId = snapshot.parent?.childId;
|
|
53808
53836
|
this.seedSubagentSummary(snapshot.children);
|
|
53809
|
-
this.applyConnectionStateSnapshot(state);
|
|
53837
|
+
this.applyConnectionStateSnapshot(state, read);
|
|
53810
53838
|
this.restoreTurnStartFromMessages(context.messages);
|
|
53811
53839
|
await this.renderSessionContext(context, {
|
|
53812
53840
|
updateFooter: true,
|
|
@@ -54563,10 +54591,13 @@ ${message}`, ["Yes", "No"], opts);
|
|
|
54563
54591
|
return showFullPaneOverlay(this.ui, component, options);
|
|
54564
54592
|
}
|
|
54565
54593
|
async showSettingsSelector() {
|
|
54594
|
+
const read = this.captureConnectionStateRead();
|
|
54566
54595
|
let state;
|
|
54567
54596
|
try {
|
|
54568
54597
|
state = await this.agentConnection.getState();
|
|
54569
|
-
this.
|
|
54598
|
+
if (!this.isConnectionStateReadCurrent(read))
|
|
54599
|
+
return;
|
|
54600
|
+
this.applyConnectionStateSnapshot(state, read);
|
|
54570
54601
|
} catch (error) {
|
|
54571
54602
|
this.showError(error instanceof Error ? error.message : String(error));
|
|
54572
54603
|
return;
|
|
@@ -66273,6 +66304,9 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
66273
66304
|
if (!state || !state.clients.has(client)) {
|
|
66274
66305
|
continue;
|
|
66275
66306
|
}
|
|
66307
|
+
const streamsSnapshot = client.transport === "private-framed" && daemonClientCapabilitiesForSession(client, activeSessionId).has("chunked_snapshot");
|
|
66308
|
+
const snapshotSignal = streamsSnapshot ? markClientSnapshotStreaming(client, activeSessionId) : void 0;
|
|
66309
|
+
let ownsSnapshot = streamsSnapshot;
|
|
66276
66310
|
try {
|
|
66277
66311
|
const result = await this.createAttachResult(client, state, {
|
|
66278
66312
|
type: "attach",
|
|
@@ -66281,7 +66315,7 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
66281
66315
|
if (this.sessions.get(activeSessionId) !== state || !state.clients.has(client)) {
|
|
66282
66316
|
continue;
|
|
66283
66317
|
}
|
|
66284
|
-
if (
|
|
66318
|
+
if (snapshotSignal) {
|
|
66285
66319
|
if (purpose === "replacement") {
|
|
66286
66320
|
this.write(client, {
|
|
66287
66321
|
type: "session_replaced",
|
|
@@ -66293,20 +66327,14 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
66293
66327
|
});
|
|
66294
66328
|
}
|
|
66295
66329
|
const snapshotId = `${result.activeSessionId}-${result.lastEventCursor?.generation}-${result.lastEventSequence}`;
|
|
66296
|
-
const
|
|
66297
|
-
|
|
66298
|
-
|
|
66299
|
-
|
|
66300
|
-
|
|
66301
|
-
|
|
66302
|
-
|
|
66303
|
-
|
|
66304
|
-
signal: snapshotSignal
|
|
66305
|
-
});
|
|
66306
|
-
} catch (error) {
|
|
66307
|
-
finishClientSnapshotStreaming(client, activeSessionId);
|
|
66308
|
-
throw error;
|
|
66309
|
-
}
|
|
66330
|
+
const transcript = createSnapshotTranscriptChunks({
|
|
66331
|
+
activeSessionId,
|
|
66332
|
+
snapshotId,
|
|
66333
|
+
messages: result.snapshot.messages,
|
|
66334
|
+
targetChunkBytes: SNAPSHOT_TARGET_CHUNK_BYTES,
|
|
66335
|
+
signal: snapshotSignal
|
|
66336
|
+
});
|
|
66337
|
+
ownsSnapshot = false;
|
|
66310
66338
|
await this.streamWorkerSnapshot(client, {
|
|
66311
66339
|
...result,
|
|
66312
66340
|
messages: result.messages ? [] : void 0,
|
|
@@ -66340,6 +66368,9 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
66340
66368
|
this.log(`could not catch up client ${client.id} for ${activeSessionId}: ${String(error)}`);
|
|
66341
66369
|
this.scheduleClientCatchupRetry(client);
|
|
66342
66370
|
return "retry-later";
|
|
66371
|
+
} finally {
|
|
66372
|
+
if (ownsSnapshot)
|
|
66373
|
+
finishClientSnapshotStreaming(client, activeSessionId);
|
|
66343
66374
|
}
|
|
66344
66375
|
}
|
|
66345
66376
|
return "drained";
|