@sema-agent/server 1.248.0 → 1.250.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/main.js CHANGED
@@ -530,9 +530,6 @@ async function main() {
530
530
  }
531
531
  else if (backend?.kind === "local") {
532
532
  backgroundAgentStore = new FileBackgroundAgentStore(config.localDataRoot ?? localRoot);
533
- if (config.requirePrincipal === true) {
534
- logger.warn("background_agent_store_local_multitenant", { note: "file-store reap only sweeps scope 'default'; principal-scoped durable rows are never reaped on the local backend (scope enumeration = core ask)" });
535
- }
536
533
  }
537
534
  if (backgroundAgentStore)
538
535
  logger.info("background_agent_store_enabled", { backend: pgPool ? "pg" : mysqlPool ? "tidb" : "file" });
@@ -997,6 +994,7 @@ async function main() {
997
994
  workflowScriptStore: (() => {
998
995
  const fileStore = createFileWorkflowScriptStore(join(config.localDataRoot ?? localRoot, "workflow-scripts"));
999
996
  return {
997
+ scopePartitioned: true,
1000
998
  persist: fileStore.persist.bind(fileStore),
1001
999
  load: fileStore.load.bind(fileStore),
1002
1000
  resolveName: (name) => resolveCollabWorkflow(name) ?? fileStore.resolveName?.(name),
@@ -1257,7 +1255,7 @@ async function main() {
1257
1255
  const reapBgAgents = backgroundAgentStore
1258
1256
  ? async () => {
1259
1257
  const store = backgroundAgentStore;
1260
- const scopes = await (store.listReapScopes?.() ?? Promise.resolve(["default"]));
1258
+ const scopes = await (store.listScopes?.() ?? Promise.resolve(["default"]));
1261
1259
  let rows = 0, sessions = 0, skipped = 0;
1262
1260
  for (const scope of scopes) {
1263
1261
  const r = await defaultTaskRegistry.reapDurableAgents(scope, { store, sessions: subRunner.sessions }, {
@@ -1698,9 +1696,9 @@ async function main() {
1698
1696
  ...(workflowJournalStore ? { workflowJournalStore } : {}),
1699
1697
  ...(workflowAgentRegistry ? { workflowAgentRegistry } : {}),
1700
1698
  subagentSteerRegistry,
1701
- subagentTaskOutput: (handle, access) => backgroundAgentOutput(defaultTaskRegistry, handle, access),
1702
- taskHandleOutput: (handle, access) => taskHandleOutput(defaultTaskRegistry, handle, access),
1703
- taskHandleStop: (handle, access) => taskHandleStop(defaultTaskRegistry, handle, access),
1699
+ subagentTaskOutput: (handle, access) => backgroundAgentOutput(defaultTaskRegistry, handle, access, backgroundAgentStore),
1700
+ taskHandleOutput: (handle, access) => taskHandleOutput(defaultTaskRegistry, handle, access, backgroundAgentStore),
1701
+ taskHandleStop: (handle, access) => taskHandleStop(defaultTaskRegistry, handle, access, backgroundAgentStore),
1704
1702
  ...(workflowCompletionInbox ? { workflowCompletionInbox } : {}),
1705
1703
  sessionAudit,
1706
1704
  sessionStorage: ownerAware,