@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
|
@@ -52,7 +52,7 @@ import { buildRlmChildSnapshots, buildSessionList, classifySessionRosterStatus,
|
|
|
52
52
|
import { DaemonSessionSummarizer } from "./daemon-session-summarizer.js";
|
|
53
53
|
import { cleanupDaemonSocketPath, closeDaemonServer, defaultDaemonSocketPath, getDaemonSocketIdentity, normalizeSocketPath, prepareDaemonSocketPath, restrictDaemonSocketPath, } from "./daemon-socket.js";
|
|
54
54
|
import { assertDaemonSupervisorOwnerCurrent, isDaemonShutdownAdmissionActive } from "./daemon-supervisor-ownership.js";
|
|
55
|
-
import { DAEMON_WORKER_ACTIVE_SESSION_ID_ENV, DAEMON_WORKER_PEER_TRANSPORT_CAPABILITY, DAEMON_WORKER_RECOVERY_JOURNAL_ENV, DAEMON_WORKER_ROLE_ENV, DAEMON_WORKER_ROSTER_CAPABILITY, DAEMON_WORKER_SUPERVISOR_SOCKET_ENV, DAEMON_WORKER_TOKEN_ENV, isDaemonWorkerFrameHeader, ROSTER_HEARTBEAT_INTERVAL_MS, SESSION_LEASE_OWNER_ID_ENV, SESSION_LEASES_ENABLED_ENV, } from "./daemon-worker-protocol.js";
|
|
55
|
+
import { DAEMON_WORKER_ACTIVE_SESSION_ID_ENV, DAEMON_WORKER_PEER_TRANSPORT_CAPABILITY, DAEMON_WORKER_RECOVERY_JOURNAL_ENV, DAEMON_WORKER_RLM_LEDGER_SESSION_DIR_ENV, DAEMON_WORKER_ROLE_ENV, DAEMON_WORKER_ROSTER_CAPABILITY, DAEMON_WORKER_SUPERVISOR_SOCKET_ENV, DAEMON_WORKER_TOKEN_ENV, isDaemonWorkerFrameHeader, ROSTER_HEARTBEAT_INTERVAL_MS, SESSION_LEASE_OWNER_ID_ENV, SESSION_LEASES_ENABLED_ENV, } from "./daemon-worker-protocol.js";
|
|
56
56
|
import { MutationDrainLatch } from "./mutation-drain-latch.js";
|
|
57
57
|
import { createRlmLedgerRegistrySeedSource, RlmSpawnLedger, readLegacyRlmSubagentRegistry as readLegacyRlmSubagentRegistryFile, rlmLedgerPath, tombstoneSavedSessionDelete, } from "./rlm-ledger.js";
|
|
58
58
|
import { readRlmSubagentDisplayEntry, rlmSubagentDisplayPath, writeRlmSubagentDisplayEntry, } from "./rlm-subagent-display.js";
|
|
@@ -666,7 +666,8 @@ export class AgentDaemon {
|
|
|
666
666
|
}
|
|
667
667
|
/** Root sessions dir that keys this daemon's spawn ledger. */
|
|
668
668
|
rlmLedgerSessionsDir() {
|
|
669
|
-
|
|
669
|
+
const assigned = this.options.worker ? process.env[DAEMON_WORKER_RLM_LEDGER_SESSION_DIR_ENV] : undefined;
|
|
670
|
+
return assigned ?? this.options.defaultSessionConfig.sessionDir ?? getSessionsDir(this.agentDir);
|
|
670
671
|
}
|
|
671
672
|
async openRlmJournalOwner() {
|
|
672
673
|
if (this.options.worker)
|
|
@@ -3461,7 +3462,7 @@ export class AgentDaemon {
|
|
|
3461
3462
|
cwd,
|
|
3462
3463
|
sessionDir,
|
|
3463
3464
|
agentDir: this.agentDir,
|
|
3464
|
-
ledgerSessionDir:
|
|
3465
|
+
ledgerSessionDir: this.rlmLedgerSessionsDir(),
|
|
3465
3466
|
scope: command.scope,
|
|
3466
3467
|
}, pageQuery);
|
|
3467
3468
|
return success(command.id, "list_saved_sessions", page);
|
|
@@ -6382,6 +6383,10 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6382
6383
|
if (!state || !state.clients.has(client)) {
|
|
6383
6384
|
continue;
|
|
6384
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;
|
|
6385
6390
|
try {
|
|
6386
6391
|
const result = await this.createAttachResult(client, state, {
|
|
6387
6392
|
type: "attach",
|
|
@@ -6390,8 +6395,7 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6390
6395
|
if (this.sessions.get(activeSessionId) !== state || !state.clients.has(client)) {
|
|
6391
6396
|
continue;
|
|
6392
6397
|
}
|
|
6393
|
-
if (
|
|
6394
|
-
daemonClientCapabilitiesForSession(client, activeSessionId).has("chunked_snapshot")) {
|
|
6398
|
+
if (snapshotSignal) {
|
|
6395
6399
|
if (purpose === "replacement") {
|
|
6396
6400
|
this.write(client, {
|
|
6397
6401
|
type: "session_replaced",
|
|
@@ -6403,21 +6407,14 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6403
6407
|
});
|
|
6404
6408
|
}
|
|
6405
6409
|
const snapshotId = `${result.activeSessionId}-${result.lastEventCursor?.generation}-${result.lastEventSequence}`;
|
|
6406
|
-
const
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
signal: snapshotSignal,
|
|
6415
|
-
});
|
|
6416
|
-
}
|
|
6417
|
-
catch (error) {
|
|
6418
|
-
finishClientSnapshotStreaming(client, activeSessionId);
|
|
6419
|
-
throw error;
|
|
6420
|
-
}
|
|
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;
|
|
6421
6418
|
await this.streamWorkerSnapshot(client, {
|
|
6422
6419
|
...result,
|
|
6423
6420
|
messages: result.messages ? [] : undefined,
|
|
@@ -6455,6 +6452,10 @@ Use prime_context read/search with selected lines or a query.`;
|
|
|
6455
6452
|
this.scheduleClientCatchupRetry(client);
|
|
6456
6453
|
return "retry-later";
|
|
6457
6454
|
}
|
|
6455
|
+
finally {
|
|
6456
|
+
if (ownsSnapshot)
|
|
6457
|
+
finishClientSnapshotStreaming(client, activeSessionId);
|
|
6458
|
+
}
|
|
6458
6459
|
}
|
|
6459
6460
|
return "drained";
|
|
6460
6461
|
}
|