@ponythewhite/base-context 1.0.13 → 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 +18 -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/amazon-bedrock.js +3 -3
- package/dist/bundle/{anthropic-BJVPUMPB.js → anthropic-AXUXEET7.js} +1 -1
- package/dist/bundle/{azure-openai-responses-ERRMAXK6.js → azure-openai-responses-J3NTJKEO.js} +2 -2
- package/dist/bundle/{bundled-modules-URKVA3UB.js → bundled-modules-O67MEO74.js} +5 -5
- package/dist/bundle/{chunk-FOGKLC7V.js → chunk-72LSQYUV.js} +1 -1
- package/dist/bundle/{chunk-TXVF6Q5H.js → chunk-DGO66I3L.js} +87 -51
- package/dist/bundle/{chunk-MUFZODP5.js → chunk-EGFIZABJ.js} +1 -1
- package/dist/bundle/{chunk-AEMRBMI2.js → chunk-IEM74GZ5.js} +9 -9
- package/dist/bundle/{chunk-25VYRAC6.js → chunk-JKKXN6JE.js} +72 -0
- package/dist/bundle/{chunk-TKOBEJ5E.js → chunk-RQFC34FM.js} +151 -51
- package/dist/bundle/{chunk-Q6UAHLII.js → chunk-V6LOBH6X.js} +2 -2
- package/dist/bundle/{cli-main-ZTJM5EEH.js → cli-main-2RER6PBE.js} +4 -4
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{google-4GA4YMUX.js → google-QLKV2ZLC.js} +2 -2
- package/dist/bundle/{google-vertex-7AMALD7D.js → google-vertex-UGLUZV6B.js} +2 -2
- package/dist/bundle/{main-53I74INO.js → main-YERLD3T4.js} +5 -5
- package/dist/bundle/{mistral-74BXMNRM.js → mistral-2ITSLHYF.js} +1 -1
- package/dist/bundle/{openai-codex-responses-COXNC4IH.js → openai-codex-responses-FRREQXS3.js} +5 -4
- package/dist/bundle/{openai-completions-BCSA5Q6S.js → openai-completions-HF6UPPLW.js} +1 -1
- package/dist/bundle/{openai-responses-ONCIZSJS.js → openai-responses-LRTMBDFW.js} +2 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +42 -25
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/autonomous.d.ts +2 -0
- package/dist/core/autonomous.d.ts.map +1 -1
- package/dist/core/autonomous.js +4 -0
- package/dist/core/autonomous.js.map +1 -1
- package/dist/core/canonical-context.d.ts.map +1 -1
- package/dist/core/canonical-context.js +7 -0
- package/dist/core/canonical-context.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/public-context.d.ts.map +1 -1
- package/dist/core/public-context.js +2 -0
- package/dist/core/public-context.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/core/view-units.d.ts.map +1 -1
- package/dist/core/view-units.js +3 -0
- package/dist/core/view-units.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-mode.js +21 -20
- package/dist/modes/daemon/daemon-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.js +11 -5
- package/dist/modes/daemon/daemon-supervisor.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/daemon/daemon-worker-protocol.d.ts +3 -0
- package/dist/modes/daemon/daemon-worker-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.js +2 -0
- package/dist/modes/daemon/daemon-worker-protocol.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/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +24 -21
- package/dist/modes/print-mode.js.map +1 -1
- package/docs/json.md +14 -1
- package/docs/long-running-agents.md +23 -2
- package/docs/providers.md +17 -0
- package/docs/upstream-1.0.15.md +83 -0
- package/package.json +4 -4
|
@@ -1846,13 +1846,16 @@ export class InteractiveMode {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
async refreshConnectionCatalog() {
|
|
1848
1848
|
this.invalidateConnectionModelRefresh();
|
|
1849
|
+
const read = this.captureConnectionStateRead();
|
|
1849
1850
|
const [state, commands, modelCatalog, resources] = await Promise.all([
|
|
1850
1851
|
this.agentConnection.getState(),
|
|
1851
1852
|
this.agentConnection.getCommands().catch(() => []),
|
|
1852
1853
|
this.agentConnection.getModelCatalog(),
|
|
1853
1854
|
this.agentConnection.getResourceSnapshot(),
|
|
1854
1855
|
]);
|
|
1855
|
-
this.
|
|
1856
|
+
if (!this.isConnectionStateReadCurrent(read))
|
|
1857
|
+
return;
|
|
1858
|
+
this.applyConnectionStateSnapshot(state, read);
|
|
1856
1859
|
this.connectionCommands = commands;
|
|
1857
1860
|
this.applyConnectionModelCatalog(modelCatalog);
|
|
1858
1861
|
this.connectionModelsFetchedAt = Date.now();
|
|
@@ -1889,7 +1892,23 @@ export class InteractiveMode {
|
|
|
1889
1892
|
getScopedHeartbeats() {
|
|
1890
1893
|
return scopeHeartbeatsToSession(this.heartbeatCatalog, this.connectionState, this.subagentSnapshots.values());
|
|
1891
1894
|
}
|
|
1892
|
-
|
|
1895
|
+
captureConnectionStateRead() {
|
|
1896
|
+
return {
|
|
1897
|
+
connection: this.agentConnection,
|
|
1898
|
+
generation: this.sessionEventGeneration,
|
|
1899
|
+
goal: this.connectionState?.goal,
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
isConnectionStateReadCurrent(read) {
|
|
1903
|
+
return read.connection === this.agentConnection && read.generation === this.sessionEventGeneration;
|
|
1904
|
+
}
|
|
1905
|
+
applyConnectionStateSnapshot(state, read) {
|
|
1906
|
+
const current = this.connectionState;
|
|
1907
|
+
// A pending read must not replace a goal observation applied after that read began.
|
|
1908
|
+
// Authoritative replacement/resync snapshots apply without a read capture.
|
|
1909
|
+
if (read && current?.sessionId === state.sessionId && current.goal !== read.goal) {
|
|
1910
|
+
state = { ...state, goal: current.goal };
|
|
1911
|
+
}
|
|
1893
1912
|
this.bindPromptStashSession(state.sessionId);
|
|
1894
1913
|
this.connectionState = state;
|
|
1895
1914
|
this.scheduleHeartbeatManagerRefresh();
|
|
@@ -5469,13 +5488,16 @@ export class InteractiveMode {
|
|
|
5469
5488
|
this.ui.requestRender();
|
|
5470
5489
|
}
|
|
5471
5490
|
async renderInitialMessages() {
|
|
5491
|
+
const read = this.captureConnectionStateRead();
|
|
5472
5492
|
const snapshot = await this.agentConnection.getInitialSnapshot();
|
|
5493
|
+
if (!this.isConnectionStateReadCurrent(read))
|
|
5494
|
+
return;
|
|
5473
5495
|
const context = this.getSessionContextFromConnectionSnapshot(snapshot);
|
|
5474
5496
|
const state = snapshot.state;
|
|
5475
5497
|
const streamingMessage = snapshot.streamingMessage;
|
|
5476
5498
|
this.rlmNodeId = snapshot.parent?.childId;
|
|
5477
5499
|
this.seedSubagentSummary(snapshot.children);
|
|
5478
|
-
this.applyConnectionStateSnapshot(state);
|
|
5500
|
+
this.applyConnectionStateSnapshot(state, read);
|
|
5479
5501
|
this.restoreTurnStartFromMessages(context.messages);
|
|
5480
5502
|
await this.renderSessionContext(context, {
|
|
5481
5503
|
updateFooter: true,
|
|
@@ -6306,10 +6328,13 @@ export class InteractiveMode {
|
|
|
6306
6328
|
return showFullPaneOverlay(this.ui, component, options);
|
|
6307
6329
|
}
|
|
6308
6330
|
async showSettingsSelector() {
|
|
6331
|
+
const read = this.captureConnectionStateRead();
|
|
6309
6332
|
let state;
|
|
6310
6333
|
try {
|
|
6311
6334
|
state = await this.agentConnection.getState();
|
|
6312
|
-
this.
|
|
6335
|
+
if (!this.isConnectionStateReadCurrent(read))
|
|
6336
|
+
return;
|
|
6337
|
+
this.applyConnectionStateSnapshot(state, read);
|
|
6313
6338
|
}
|
|
6314
6339
|
catch (error) {
|
|
6315
6340
|
this.showError(error instanceof Error ? error.message : String(error));
|