@ponythewhite/base-context 1.0.13 → 1.0.14
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/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-UODO7ZR7.js} +5 -5
- package/dist/bundle/{chunk-FOGKLC7V.js → chunk-72LSQYUV.js} +1 -1
- 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-TXVF6Q5H.js → chunk-NLRWERWA.js} +37 -32
- package/dist/bundle/{chunk-TKOBEJ5E.js → chunk-SX7CAXWU.js} +22 -4
- package/dist/bundle/{chunk-Q6UAHLII.js → chunk-V6LOBH6X.js} +2 -2
- package/dist/bundle/{cli-main-ZTJM5EEH.js → cli-main-6GXXIMQQ.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-HF64B4HM.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 +6 -1
- 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/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/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 +4 -3
- 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-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/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/package.json +4 -4
|
@@ -35,7 +35,7 @@ import { classifySessionRosterStatus, isEvictableEmptySessionSummary, isSessionS
|
|
|
35
35
|
import { acquireDaemonSocketPathLease, cleanupDaemonSocketPath, closeDaemonServer, defaultDaemonSocketDir, defaultDaemonSocketPath, getDaemonSocketIdentity, normalizeSocketPath, prepareDaemonSocketPath, restrictDaemonSocketPath, } from "./daemon-socket.js";
|
|
36
36
|
import { acquireDaemonSupervisorOwnership, isDaemonShutdownAdmissionActive, waitForDaemonStartupFence, } from "./daemon-supervisor-ownership.js";
|
|
37
37
|
import { DaemonWorkerAuthenticationError, DaemonWorkerClient, DaemonWorkerCompatibilityError, DaemonWorkerProbeTimeoutError, } from "./daemon-worker-client.js";
|
|
38
|
-
import { DAEMON_WORKER_ACTIVE_SESSION_ID_ENV, DAEMON_WORKER_INSTANCE_ID_ENV, DAEMON_WORKER_PEER_TRANSPORT_CAPABILITY, DAEMON_WORKER_RECOVERY_JOURNAL_ENV, DAEMON_WORKER_ROLE_ENV, DAEMON_WORKER_ROSTER_CAPABILITY, DAEMON_WORKER_STARTUP_GATE_COMMIT, DAEMON_WORKER_STARTUP_GATE_FD_ENV, DAEMON_WORKER_SUPERVISOR_SOCKET_ENV, DAEMON_WORKER_TOKEN_ENV, durableDaemonCreateCommand, durableDaemonWorkerDescriptor, isDaemonRlmCapacitySnapshot, ROSTER_HEARTBEAT_INTERVAL_MS, SESSION_LEASE_OWNER_ID_ENV, SESSION_LEASES_ENABLED_ENV, } from "./daemon-worker-protocol.js";
|
|
38
|
+
import { DAEMON_WORKER_ACTIVE_SESSION_ID_ENV, DAEMON_WORKER_INSTANCE_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_STARTUP_GATE_COMMIT, DAEMON_WORKER_STARTUP_GATE_FD_ENV, DAEMON_WORKER_SUPERVISOR_SOCKET_ENV, DAEMON_WORKER_TOKEN_ENV, durableDaemonCreateCommand, durableDaemonWorkerDescriptor, isDaemonRlmCapacitySnapshot, ROSTER_HEARTBEAT_INTERVAL_MS, SESSION_LEASE_OWNER_ID_ENV, SESSION_LEASES_ENABLED_ENV, } from "./daemon-worker-protocol.js";
|
|
39
39
|
import { MutationDrainLatch } from "./mutation-drain-latch.js";
|
|
40
40
|
import { createRlmLedgerRegistrySeedSource, RlmSpawnLedger, rlmLedgerPath, tombstoneSavedSessionDelete, } from "./rlm-ledger.js";
|
|
41
41
|
import { captureSavedSessionPageQuery } from "./saved-session-page.js";
|
|
@@ -303,6 +303,7 @@ function isDaemonWorkerDescriptor(value, socketPath) {
|
|
|
303
303
|
(descriptor.pid ?? 0) > 0 &&
|
|
304
304
|
(descriptor.processStartId === undefined || typeof descriptor.processStartId === "string") &&
|
|
305
305
|
(descriptor.ownerClientId === undefined || typeof descriptor.ownerClientId === "string") &&
|
|
306
|
+
(descriptor.rlmLedgerSessionDir === undefined || typeof descriptor.rlmLedgerSessionDir === "string") &&
|
|
306
307
|
typeof descriptor.socketPath === "string" &&
|
|
307
308
|
typeof descriptor.authenticationToken === "string" &&
|
|
308
309
|
(descriptor.workerInstanceId === undefined || typeof descriptor.workerInstanceId === "string") &&
|
|
@@ -1664,7 +1665,7 @@ export class DaemonSupervisor {
|
|
|
1664
1665
|
}
|
|
1665
1666
|
const owner = this.rlmCapacityOwner(worker);
|
|
1666
1667
|
const journal = this.assertRlmJournalAdmission();
|
|
1667
|
-
const scope = this.rlmJournalScope(worker.descriptor.sessionDir ?? this.defaultSessionConfig.sessionDir);
|
|
1668
|
+
const scope = this.rlmJournalScope(worker.descriptor.rlmLedgerSessionDir ?? worker.descriptor.sessionDir ?? this.defaultSessionConfig.sessionDir);
|
|
1668
1669
|
if (canonicalSessionPath(scope.journalPath) !== journal.ledgerPath) {
|
|
1669
1670
|
throw new Error("Worker RLM family is not owned by this supervisor");
|
|
1670
1671
|
}
|
|
@@ -1797,7 +1798,9 @@ export class DaemonSupervisor {
|
|
|
1797
1798
|
throw new Error("Worker authentication failed for RLM ledger mutation");
|
|
1798
1799
|
}
|
|
1799
1800
|
const owner = this.assertRlmJournalAdmission();
|
|
1800
|
-
const scope = this.rlmJournalScope(worker.descriptor.
|
|
1801
|
+
const scope = this.rlmJournalScope(worker.descriptor.rlmLedgerSessionDir ??
|
|
1802
|
+
worker.descriptor.sessionDir ??
|
|
1803
|
+
this.defaultSessionConfig.sessionDir);
|
|
1801
1804
|
if (canonicalSessionPath(scope.journalPath) !== owner.ledgerPath) {
|
|
1802
1805
|
throw new Error("Worker RLM ledger family is not owned by this supervisor");
|
|
1803
1806
|
}
|
|
@@ -2608,13 +2611,13 @@ export class DaemonSupervisor {
|
|
|
2608
2611
|
if ("activeSessionId" in command) {
|
|
2609
2612
|
const match = await this.findWorkerForClient(client, command.activeSessionId);
|
|
2610
2613
|
cwd = match.summary.cwd;
|
|
2611
|
-
sessionDir = this.defaultSessionConfig.sessionDir;
|
|
2614
|
+
sessionDir = match.worker.descriptor.sessionDir ?? this.defaultSessionConfig.sessionDir;
|
|
2612
2615
|
}
|
|
2613
2616
|
else {
|
|
2614
2617
|
cwd = resolve(command.cwd);
|
|
2615
2618
|
sessionDir = command.sessionDir;
|
|
2616
2619
|
}
|
|
2617
|
-
const { agentDir, sessionsDir: ledgerSessionDir } = this.rlmJournalScope(
|
|
2620
|
+
const { agentDir, sessionsDir: ledgerSessionDir } = this.rlmJournalScope();
|
|
2618
2621
|
const page = await this.catalog.list(cwd, sessionDir, { page: pageQuery, scope, agentDir, ledgerSessionDir });
|
|
2619
2622
|
return success(command.id, "list_saved_sessions", page);
|
|
2620
2623
|
}
|
|
@@ -2853,6 +2856,7 @@ export class DaemonSupervisor {
|
|
|
2853
2856
|
const recoveryJournalPath = existing?.descriptor.recoveryJournalPath ?? join(this.descriptorDir, `${workerId}.recovery.jsonl`);
|
|
2854
2857
|
const orphanProcessJournalPath = existing?.descriptor.orphanProcessJournalPath ?? join(this.descriptorDir, `${workerId}.orphans.jsonl`);
|
|
2855
2858
|
const launch = createCliSubprocessLaunchSpec(["--mode", "daemon", "--daemon-socket", socketPath]);
|
|
2859
|
+
const rlmLedgerSessionDir = this.rlmJournalScope().sessionsDir;
|
|
2856
2860
|
const workerEnvironment = createCliSubprocessEnv({
|
|
2857
2861
|
...process.env,
|
|
2858
2862
|
...launchEnv,
|
|
@@ -2861,6 +2865,7 @@ export class DaemonSupervisor {
|
|
|
2861
2865
|
[DAEMON_WORKER_INSTANCE_ID_ENV]: workerInstanceId,
|
|
2862
2866
|
[DAEMON_WORKER_ACTIVE_SESSION_ID_ENV]: rootActiveSessionId,
|
|
2863
2867
|
[DAEMON_WORKER_SUPERVISOR_SOCKET_ENV]: this.socketPath,
|
|
2868
|
+
[DAEMON_WORKER_RLM_LEDGER_SESSION_DIR_ENV]: rlmLedgerSessionDir,
|
|
2864
2869
|
[DAEMON_WORKER_RECOVERY_JOURNAL_ENV]: recoveryJournalPath,
|
|
2865
2870
|
[DAEMON_WORKER_STARTUP_GATE_FD_ENV]: String(WORKER_STARTUP_GATE_FD),
|
|
2866
2871
|
[ORPHAN_PROCESS_JOURNAL_ENV]: orphanProcessJournalPath,
|
|
@@ -2930,6 +2935,7 @@ export class DaemonSupervisor {
|
|
|
2930
2935
|
rootActiveSessionId,
|
|
2931
2936
|
ownerClientId: existing?.descriptor.ownerClientId ?? ownerClientId,
|
|
2932
2937
|
sessionDir: createCommand.config?.sessionDir,
|
|
2938
|
+
rlmLedgerSessionDir,
|
|
2933
2939
|
createdAt: existing?.descriptor.createdAt ?? now,
|
|
2934
2940
|
updatedAt: now,
|
|
2935
2941
|
lifecycle: "starting",
|