UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 2.57 kB
import"./openclaw-state-read-map-size-DJbMcZYM.mjs";import"./openclaw-state-read-sqlite-database-admission-Ck6VG7rE.mjs";import"./openclaw-state-read-openclaw-state-db-cache-BVY8IYkn.mjs";import"./openclaw-state-read-sqlite-lifecycle-errors-3AcFJUep.mjs";import"./openclaw-state-read-openclaw-state-db.paths-CFemYLpA.mjs";import"./openclaw-state-read-openclaw-state-db-contract-DiFTYPe3.mjs";import{_ as e,a as t,l as n,p as r}from"./openclaw-state-read-schemas-CLrAtqTl.mjs";import"./openclaw-state-read-kysely-sync-cache-state-PxpuKzoA.mjs";import"./openclaw-state-read-sqlite-busy-timeout-D5Khm-oR.mjs";import"./openclaw-state-read-subsystem-DSi0tJn8.mjs";import{a as i,r as a}from"./openclaw-state-read-kysely-sync-DQyYiAw5.mjs";import{o}from"./openclaw-state-read-openclaw-state-db-schema-helpers-BkqUYEFY.mjs";import"./openclaw-state-read-openclaw-state-db-DnrW7QY9.mjs";import"./openclaw-state-read-openclaw-state-db-readonly-CDG18cNK.mjs";import"./openclaw-state-read-openclaw-state-db-handle-D9nuaODy.mjs";import"./openclaw-state-read.worker.js";import"./openclaw-state-read-openclaw-state-worker-context-Cvog3s4V.mjs";import"./openclaw-state-read-openclaw-state-feature-schema-BPVIIoAx.mjs";import"./openclaw-state-read-state-migrations.receipts-C4jnz6ia.mjs";import"./openclaw-state-read-openclaw-state-db-existing-write-BFFt_1Yy.mjs";import{r as s}from"./openclaw-state-read-update-run-recovery-store-B-8Xa-fT.mjs";import"./openclaw-state-read-startup-migration-checkpoint-B37WkXCU.mjs";import"node:fs";import{AsyncLocalStorage as c}from"node:async_hooks";import"node:util";import"node:buffer";const l=r({pluginId:e().min(1),reason:e().min(1),command:e().min(1),requiresStateMigration:n(!0).optional(),requiresDoctorInspection:n(!0).optional(),configPaths:t(t(e().min(1)).min(1)).optional(),validationExcludedPaths:t(t(e().min(1)).min(1)).optional()});new c,s.passthrough(),new c,new c;function readPendingMigrationRows(e,t=!1){return a(e,i(e).selectFrom(`migration_runs`).select([`id`,`report_json`,`status`]).where(`id`,`like`,`deferred-plugin-migration:%`).where(`status`,`in`,t?[`pending`,`deferred`]:[`pending`]).orderBy(`id`)).rows}function pendingMigrationRecords(e){return e.map(e=>l.parse(JSON.parse(e.report_json)))}function readPendingMigrationRecords(e,t=!1){return o(e,`migration_runs`)?pendingMigrationRecords(readPendingMigrationRows(e,t)):[]}const u={"plugins.deferredMigrations.read":(e,t)=>({type:`plugins.deferredMigrations.read`,pending:readPendingMigrationRecords(t,e?.includeDeferred)})};export{u as deferredPluginMigrationReadOperations};