@happyvertical/smrt-app-runtime 0.55.21 → 0.55.22

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/AGENTS.md CHANGED
@@ -75,7 +75,9 @@ Application infrastructure composition for the validated runtime profiles in
75
75
  readiness-checked before startup succeeds.
76
76
  - `createTaskWorker()` and `createScheduleWorker()` initialize the normal jobs
77
77
  package runners against the shared PostgreSQL database. They are intended for
78
- separate processes; the web process does not start them automatically. The
78
+ separate processes; the web process does not start them automatically. A
79
+ task worker polls `default` plus `SCHEDULED_JOB_QUEUE` (`agents`, where
80
+ `ScheduleRunner` enqueues) unless `queues` is passed (#3141). The
79
81
  worker process must import the app's compiled registration
80
82
  (`.smrt/runtime/register.js`, #3117) first; runners resolve `objectType`
81
83
  through the registry and never load application source themselves.
@@ -6,7 +6,7 @@ import { dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:p
6
6
  import { promisify } from "node:util";
7
7
  import { Worker } from "node:worker_threads";
8
8
  import { resolveApplicationRuntime } from "@happyvertical/smrt-config";
9
- import { ScheduleRunner, TaskRunner } from "@happyvertical/smrt-jobs";
9
+ import { SCHEDULED_JOB_QUEUE, ScheduleRunner, TaskRunner } from "@happyvertical/smrt-jobs";
10
10
  import { Person, ProfileTypeCollection } from "@happyvertical/smrt-profiles";
11
11
  import { withSystemContext } from "@happyvertical/smrt-tenancy";
12
12
  import { DEFAULT_ROLE_SLUGS, MembershipCollection, MembershipStatus, PermissionResolver, RoleCollection, SessionCollection, SessionService, TenantService, UserCollection, UserStatus } from "@happyvertical/smrt-users";
@@ -374,7 +374,10 @@ var InitializedDeployedApplicationRuntime = class {
374
374
  async initializeTaskWorker(config) {
375
375
  let runner;
376
376
  try {
377
- runner = new TaskRunner(config);
377
+ runner = new TaskRunner({
378
+ ...config,
379
+ queues: config.queues ?? ["default", SCHEDULED_JOB_QUEUE]
380
+ });
378
381
  await runner.initialize(this.db);
379
382
  } catch {
380
383
  if (runner) await this.stopOrRetainUnreturnedWorker(runner);
@@ -2549,4 +2552,4 @@ function isDirectoryNotEmpty(error) {
2549
2552
  //#endregion
2550
2553
  export { reclaimStaleRecord as A, deepFrozenPlainCopy as B, findInstalledPackage as C, processExists as D, lockOwnerPid as E, LOCAL_MCP_TOKEN_PRINCIPAL as F, initializeDeployedApplicationRuntime as G, resolveBoundMembershipPermissions as H, LOCAL_MCP_TOKEN_TABLE as I, isSessionTenantAuthorized as K, MAX_LOCAL_MCP_TOKEN_TTL_SECONDS as L, runtimeConfigurationFingerprint as M, DEFAULT_LOCAL_MCP_TOKEN_TTL_SECONDS as N, withOperationLock as O, LOCAL_MCP_TOKEN_PREFIX as P, isLocalMcpTokenPrincipal as R, createProviderReadinessProbe as S, isStaleOperationLock as T, DeployedRuntimeCleanupError as U, ownValue as V, DeployedRuntimeError as W, MAX_RUNTIME_DIAGNOSTIC_TOOLS as _, openLocalMcpTokenStore as a, projectRuntimeDiagnostics as b, validateApplicationId as c, readActiveWriterLease as d, ONBOARDING_HANDOFF_FILES as f, MAX_RUNTIME_DIAGNOSTIC_ERRORS as g, resolveApplicationStateRoot as h, initializeLocalApplicationRuntime as i, resolveApplicationId as j, RECLAIM_MUTEX_FILE as k, validateLocalDatabaseStorage as l, removeOnboardingHandoff as m, MIGRATION_FAILED_MESSAGE as n, prepareLocalDatabaseStorage as o, prepareApplicationStateRoot as p, encodeApplicationId as r, resolveLocalRuntimePaths as s, LocalRuntimeError as t, acquireWriterLease as u, RUNTIME_DIAGNOSTICS_SCHEMA_VERSION as v, resolveReadinessModule as w, PROVIDER_READINESS_SETTINGS as x, RUNTIME_WORKER_FRESHNESS_SECONDS as y, PlainDataError as z };
2551
2554
 
2552
- //# sourceMappingURL=src-D7cM0zHW.js.map
2555
+ //# sourceMappingURL=src-vP6GV99v.js.map