@sema-agent/server 1.267.0 → 1.269.0
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/dist/http/server.d.ts.map +1 -1
- package/dist/http/server.js +30 -6
- package/dist/http/server.js.map +1 -1
- package/dist/main.js +4 -3
- package/dist/main.js.map +1 -1
- package/dist/parked-decide.d.ts +1 -1
- package/dist/parked-decide.d.ts.map +1 -1
- package/dist/parked-decide.js +10 -2
- package/dist/parked-decide.js.map +1 -1
- package/dist/plugins/fork-routing-session-store.d.ts +1 -0
- package/dist/plugins/fork-routing-session-store.d.ts.map +1 -1
- package/dist/plugins/fork-routing-session-store.js +42 -0
- package/dist/plugins/fork-routing-session-store.js.map +1 -1
- package/dist/plugins/session-store.d.ts +3 -0
- package/dist/plugins/session-store.d.ts.map +1 -1
- package/dist/plugins/session-store.js +10 -0
- package/dist/plugins/session-store.js.map +1 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { normalizeSuggestNextPrompts, normalizeResilience, normalizeAttachments,
|
|
|
26
26
|
import { createBrain, brainSummary } from "./brain.js";
|
|
27
27
|
import { loadConfig, logConfigDiagnostics } from "./config.js";
|
|
28
28
|
import { resourceSuspendOptIn } from "./resource-suspend.js";
|
|
29
|
-
import { createSessionStore,
|
|
29
|
+
import { createSessionStore, ensureChildSessionDurableWithPromotion } from "./plugins/session-store.js";
|
|
30
30
|
import { ForkRoutingSessionStore } from "./plugins/fork-routing-session-store.js";
|
|
31
31
|
import { createStoreBackend } from "./plugins/store-backend.js";
|
|
32
32
|
import { e2bExecutionEnvFactory } from "./plugins/remote-env-e2b.js";
|
|
@@ -1141,6 +1141,7 @@ async function main() {
|
|
|
1141
1141
|
logger.info("session_auto_title_enabled", {});
|
|
1142
1142
|
const workflowsCapable = workflowsCapability(runnerDeps);
|
|
1143
1143
|
const checkpointStore = backend?.checkpoint && config.durableApproval ? backend.checkpoint(logger) : undefined;
|
|
1144
|
+
const subRunnerSessions = new ForkRoutingSessionStore(sessionStore, new TtlSessionStore({ defaultTtlDays: 1 / 24 }));
|
|
1144
1145
|
const subRunner = new Runner({
|
|
1145
1146
|
brain,
|
|
1146
1147
|
models: config.models,
|
|
@@ -1149,7 +1150,7 @@ async function main() {
|
|
|
1149
1150
|
pricing,
|
|
1150
1151
|
tracer,
|
|
1151
1152
|
promptSource,
|
|
1152
|
-
sessionStore:
|
|
1153
|
+
sessionStore: subRunnerSessions,
|
|
1153
1154
|
...(executionEnvFactory ? { executionEnvFactory } : {}),
|
|
1154
1155
|
...(lspManager ? { lspManager } : {}),
|
|
1155
1156
|
...(backgroundAgentStore ? { backgroundAgentStore } : {}),
|
|
@@ -1259,7 +1260,7 @@ async function main() {
|
|
|
1259
1260
|
const webSearch = webSearchCfg ? createWebSearchBackend(webSearchCfg) : undefined;
|
|
1260
1261
|
if (webSearch)
|
|
1261
1262
|
logger.info(`WebSearch enabled (provider=${webSearchCfg.provider}, maxResults=${webSearch.maxResults})`);
|
|
1262
|
-
const ensureChildSessionDurable = checkpointStore && config.sessionBackend === "tidb" ? (sessionId) =>
|
|
1263
|
+
const ensureChildSessionDurable = checkpointStore && config.sessionBackend === "tidb" ? (sessionId) => ensureChildSessionDurableWithPromotion(sessionStore, subRunnerSessions, sessionId) : undefined;
|
|
1263
1264
|
const scenarioDeps = {
|
|
1264
1265
|
runner, subRunner, model: "default", skills, repoClient, requirePrincipal: config.requirePrincipal,
|
|
1265
1266
|
...(webSearch ? { webSearch } : {}), metrics, logger,
|