2026-05-02
- Added first-class grouped and normalized lookup support to the ORM query builder.
QueryBuilderand model wrappers now exposewhereGroup(...)/orWhereGroup(...)for nested boolean scopes andwhereNormalized(...)/orWhereNormalized(...)for portableLOWER(TRIM(column)) = ?text equality, fixing the long-standingorWhere(...)behavior bug that previously compiled asANDand removing the need for raw SQL in guest-style identifier and normalized-email lookups across SQLite and D1.
2026-04-30
Fixed the release publish shim used by
scripts/release/publish-packages.mjsso package builds can type-check against the current@zintrust/coreproxy and shutdown-trace API surface during npm release. The temporary shim now exposesShutdownTraceandWorkerSigning, which unblocks@zintrust/workers,@zintrust/cloudflare-d1-proxy,@zintrust/cloudflare-kv-proxy, and@zintrust/queue-monitorpackage builds during publish.Fixed System Trace runtime bridge resolution for project roots that differ from the shell cwd. src/boot/registry/runtime.ts now honors
ZINTRUST_PROJECT_ROOTbefore falling back toprocess.cwd()when resolving a localsrc/runtime/plugins/trace-runtime.*bridge, and the runtime coverage suite now pins that behavior with a mismatched-cwd regression test. This unblocks trace startup for Docker/new-start layouts that exportZINTRUST_PROJECT_ROOTbefore boot.Improved fresh-project database DX across Node and Workers. Newly scaffolded apps now keep the existing
sqlitedefault for plainzin s, but generatedconfig/database.tsfiles no longer fall back tomysqlwhenDB_CONNECTIONis unset underzin s --wg; they now default tod1whenCLOUDFLARE_WORKER=trueandsqliteotherwise. Scaffolded.envfiles also now includeUSE_ENV=false, and when developers setUSE_ENV=trueZinTrust skips.dev.varsmaterialization for Wrangler dev sozin s --wgcan read.envdirectly without requiring.zintrust.jsonenv-key maintenance.
2026-04-28
Tightened CLI launcher and watch-process exit tracking around
zin s. The top-level bin launchers andSpawnUtilnow preserve theexitresult but wait forclose, and they relay childstdout/stderrthrough owned pipes instead of handing the terminal through directly. That keeps more of the watch-mode shutdown tail attached to the parent CLI lifecycle while preserving the existing signal-forwarding behavior and focused SpawnUtil regression coverage.Fixed plain
zin sshutdown when worker services are disabled. The runtime no longer registers worker management routes or the worker shutdown hook whenWORKER_ENABLED=false, which stops the non-worker watch path from importing the workers package during app shutdown and removes thetsxforce-kill that still appeared after a single Ctrl+C.Added env-gated shutdown tracing for the worker-enabled watch path.
SHUTDOWN_TRACE=truenow emits active-handle snapshots and step-level teardown markers across bootstrap shutdown,WorkerFactory,MultiQueueWorker, queue reliability startup/stop, and queue monitor create/close. The traced live run showed that the worker shutdown path now completes, queue monitor cleanup removes two Redis sockets, and the remaining surviving handle after full app shutdown is a single Redis socket that still persists even aftershutdownRedisConnections()reports completion.Fixed the BullMQ shared Redis shutdown hang that was still stalling worker-enabled
zin sexits insidePriorityQueue.shutdown(). packages/queue-redis/src/BullMQRedisQueue.ts now boundssharedConnection.quit()and falls back todisconnect()with a warning when Redis does not complete a graceful quit in time, matching the existing tracked-Redis shutdown strategy used elsewhere in core.Tightened the remaining worker shutdown fallback budgets for
tsx watch. WorkerFactory async teardown steps now stop waiting sooner, and the BullMQ shared Redis quit fallback now cuts over todisconnect()on a much shorter bound so watch-mode Ctrl+C exits do not spend most oftsx's child-exit window inside queue transport teardown.Fixed
PriorityQueue.shutdown()so worker-enabledzin sdoes not dynamically import@zintrust/queue-redisduring Ctrl+C if the process never used priority queues in the first place. That shutdown path is now a cached-module no-op, which removes an unnecessary optional-package load from the exact zero-worker startup/shutdown case that was still reachingtsxforce-kill.Fixed the next worker tail hang in
DeadLetterQueue.shutdown(). Its Redis client now uses the same short bounded graceful-quit path with forceddisconnect()fallback, so worker-enabledzin sno longer spends the remaining watch-exit window waiting on an unbounded DLQ Redis quit.Tightened the remaining dev watch fallback budgets again after parallelizing worker teardown. The worker tail now cuts over from graceful quit to warning-and-continue on much shorter bounds for shared BullMQ Redis, DLQ Redis, and worker-store cleanup so
tsx watchexits can complete before its own child kill window.Fixed the outer
zin/z/zt/zintrustlauncher wrappers so Ctrl+C no longer drops the shell prompt while the child CLI is still printing shutdown logs. The bin wrappers now trapSIGINT/SIGTERM, stay alive until the spawnedzintrust-mainchild actually closes, and only fall back to explicit forwarding when needed.Fixed the bootstrap graceful-shutdown default budget mismatch for live runtimes. src/boot/bootstrap.ts had still been defaulting
SHUTDOWN_TIMEOUTto1500mseven though the env contract, scaffolding, and config surface already use10000ms. Worker-enabledzin sshutdowns now get the intended default budget before the watch wrapper falls back to force-killing a slow child.Hardened worker-management shutdown so
zin swatch mode no longer depends on every worker subsystem quitting cleanly before the child process can exit.WorkerFactory.shutdown()now awaits the async tail teardown steps it previously fire-and-forgot, and each async worker subsystem shutdown is bounded so a stuck Redis/plugin/DLQ quit path logs a warning and lets shutdown continue instead of leavingtsx watchto kill the process.Tightened the plain
zin swatch-mode shutdown fallback so the CLI no longer waits indefinitely for a lingeringtsx watchparent after the app itself has already logged a clean shutdown. The TTY signal helper now follows its delayed fallbackSIGINTwith one automaticSIGTERMescalation if the watch parent still has not exited, which removes the recurring need for a second manual Ctrl+C while preserving the earlier single-signal fast path.Fixed the new coverage-test pre-commit regression by removing dead unreachable code from the SQLite schema coverage test and scoping
max-nested-callbackssuppression to the handful of mock-heavy coverage files that intentionally build nestedvi.doMock(...)factories. This restores.husky/pre-commitwithout weakening repository-wide lint rules or changing runtime behavior.Stabilized the SQLite CLI migration integration coverage path so it now validates real CLI success in temp-project runs instead of silently passing through hidden subprocess failures. The test helper now mirrors the repo's source path aliases more completely, points the local
@zintrust/coreshim at the actual router source file, throws immediately on non-zerozinsubprocess exits, and allows enough timeout headroom for the fullcoverage:patchrun when the TSX-backed CLI is booted multiple times under suite-wide load.Refined the plain
zin sshutdown fix for Node watch mode sotsx watchno longer logsPrevious process hasn't exited yet. Force killing...during normal Ctrl+C shutdown. The watch path now keeps direct TTY signal delivery as the primary path and uses a short delayed fallback signal only if the watcher is still alive after the app shutdown grace period, which preserves single-Ctrl+C exits without reintroducing the earlier hanging behavior or touching the already-goodzin s --wgpath.Ported the Worker parse-safety fixes from the April 28 debugging note into source-owned ZinTrust modules instead of relying on local
node_modulesedits.src/runtime/WorkerAdapterImports.ts,src/boot/bootstrap.ts,src/runtime/plugins/trace.ts,src/http/RequestContext.ts, andsrc/runtime/PluginManager.tsno longer rely on parse-time top-levelawaitor eager CLI-only imports, while preserving explicit readiness promises for bootstrap and worker/plugin initialization and on-demand loading for plugin installs. This keepszin s --wgparseable under Wrangler/Miniflare and still lets the normal startup path reachReady on http://localhost:7777.
2026-04-27
Fixed sqlite-family migration diagnostics for
schema.table(...)foreign-key alterations. When a migration tries to add or drop foreign keys, or drop columns, on SQLite/D1-backed tables, ZinTrust now fails with a targeted validation message that names the affected table, foreign key, local column, referenced table and column, and any detected SQLite affinity mismatch such asTEXTversusINTEGER, instead of only throwing the previous generic table-rebuild error.Fact-checked and corrected four historical core-gap notes under
newstart/. The current workspace already has the described fixes for single-row hydration and mutator-safe raw hydration, accessor-backed direct model property reads,belongsTo/belongsToManyeager-loading parity, and queue-monitor stale-history retry state handling, so those notes now explicitly describe their verified fixed status instead of presenting them as current gaps.
2026-04-24
Added a package-local
lintscript to@zintrust/storage-gcsso workspace-level checks likenpm run lint -- --max-warnings=0work when run frompackages/storage-gcsinstead of failing with a missing-script error.Stabilized the Husky pre-push
coverage:patchpath by raising VitesttestTimeoutandhookTimeoutonly during--coverageruns. Normalnpm teststill keeps the tighter fast-feedback budget, while full V8 coverage runs now have enough headroom for the repo's slower import-heavy CLI, broadcast, and schedule slices without intermittent timeout failures.Stabilized the remaining per-test timeout overrides that were still bypassing the coverage-only Vitest timeout policy.
tests/unit/CoverageBoost.test.tsandtests/integration/cli/ScheduleCli.SourceFirst.integration.test.tsnow allow enough time for aggregate patch-coverage runs instead of failing intermittently under Husky with explicit 10s and 30s caps.Fixed the ORM hydration contract so
Model.hydrate(...)is now idempotent for already hydrated model instances. Passing an existing model back intohydrate(...)now returns that same instance unchanged instead of rebuilding a second model from enumerable properties, which preserves accessor-backed reads, raw stored attributes, attached relations, dirty tracking, and subsequentsave()behavior across helper boundaries.Fixed the package publish pipeline so workspace adapters keep their checked-in
peerDependencies['@zintrust/core']value during npm publish instead of being rewritten to a stale caret range. This closes the release-path regression that republished@zintrust/cache-redis@1.5.0with@zintrust/core: ^1.2.0on npm even though the source manifest declared*, and bumps@zintrust/cache-redisto1.5.1for the corrective republish.
2026-04-22
Extracted a dedicated worker-only signing helper for Cloudflare proxy entrypoints. The D1/KV worker path now goes through
WorkerSigninginstead of embedding verification logic in shared proxy files or routing through broader runtime signing services, which makes the worker-safe import boundary explicit and keeps the proxy surface offEnvand other app-runtime config code.Fixed the shared Cloudflare D1/KV proxy verification path so the worker entrypoints no longer pull
SigningServiceandEnvfrom the broader app runtime config graph. The common proxy helper now verifies signed requests directly withSignedRequest, which keeps both core and standalone Cloudflare proxy bundles on a Worker-safe import surface instead of reintroducing startup failures through shared config imports.Fixed the Cloudflare Worker startup path so
WorkerAdapterImportsno longer uses top-levelawaitin the core Worker bundle. Worker boot still awaits the same readiness promise at runtime, but the generated service entry now stays parseable under Wrangler/Miniflare instead of failing early withUnexpected reserved wordduringZintrustD1Proxy.jsstartup.Added signed remote trace transport support to
@zintrust/trace. Apps can now setTRACE_PROXY=trueto send the same write/update/latest-family trace operations they already produce to a remote ingest server viaTRACE_PROXY_URL+TRACE_PROXY_PATH, while trace servers can mountregisterTraceIngestGateway(...)to verify and persist those requests through the existingTraceStorageflow. The trace runtime also now supportsTRACE_SERVICE_TAG, falling back toAPP_NAMEso multi-project trace servers can tag incoming data consistently.Added arbitrary env-key generation to the CLI.
zin key:<ENV_KEY>now normalizes tozin key:env <ENV_KEY>, generates a new secret value, writes it into.env, and prompts before overwriting an existing key unless--yesis provided.Added a first-class date migration helper so you can now write
table.date('blocked_date')for date-only columns and keeptable.timestamp(...)for date-time values. The migration blueprint/types/compiler all support the new helper.Added a framework-owned ORM contract for model-owned primary keys through
Model.primaryKey. Projects can now useModel.primaryKey.uuid('id')orModel.primaryKey.using(...)instead of repeating fragilecreatingobserver guards, and the built-in missing-value check correctly treatsundefined,null, empty strings, and whitespace-only strings as missing before insert.Fixed the unified request-input contract so adapter-populated cached raw bodies now go through the same parse-and-set path as streamed request bodies. That keeps
req.getBody(),req.data(), andreq.get(key)aligned in both Node.js and Workers runtimes.Expanded
RemoteSignedJsonproxy error extraction so non-2xx signed JSON calls now surface the most specific proxy detail they can find from top-level{ code, message }, nestedbody, nestederror, or plain-text/top-levelmessagefallback shapes.Fixed the
kv-remoteproxy credential gate so it now falls back to the normalized signing identity fromAPP_NAMEandAPP_KEYthe same wayd1-remotealready does. When explicitKV_REMOTE_KEY_ID/KV_REMOTE_SECRETvalues are absent, the driver keeps the signed proxy path available instead of prematurely forcing the Cloudflare KV API path.Fixed
npm run release:sync-versionsso it now detects changed core source and changed package directories, looks up the currently published npm version for each affected manifest, and bumps only to the next release patch instead of leaving publishable packages stuck at an already-published version. The release sync path now uses ZinTrust's bounded carry rule for patch increments, so it advances sequentially and rollsx.9.99 -> (x+1).0.0without skipping intermediate publish versions.Updated the npm publish preflight and release publish scripts so they now run
npx npm-check-updates -ubefore install or package publish instead of relying on the older manual dependency-range sync path. The rootcheck-upscript now performs the updating variant by default, withcheck-up:checkkept as the read-only listing command.Fixed trace proxy sender startup so
@zintrust/trace/registerno longer resolves the sender-local trace storage DB before switching toProxyTraceStorage. This removes the unused local SQLite readiness failure from proxy-mode worker boot, suppresses the local dashboard hint whenTRACE_PROXY=truewith a realTRACE_PROXY_URL, and stopspackages/tracefrom publishing its rawsrc/tree to npm.
2026-04-21
Fixed the core auth storage insert contract so the built-in Bulletproof device store, JWT revocation store, and JWT sessions store now keep working when projects switch those core-owned tables from
table.id()totable.uuid('id')without adding a database-side default. Each store still attempts the existing insert path first, then retries once with a generated UUID only when the database explicitly rejects the missingid.RemoteSignedJsonalso now preserves top-level proxy{ code, message, status }bodies so D1 remote failures keep their actionable detail.Fixed the remaining
@zintrust/tracebootstrap split between dashboard routing and runtime registration. The dashboard registrar now fails fast when no explicit, runtime, or configured trace connection can be resolved instead of silently falling back to the app default database, shared trace connection error helpers now steer eager startup/plugin imports toward@zintrust/trace/plugin, and core boot now falls back to its bundledtrace-runtimebridge when a project-local bridge is absent so installed trace packages can initialize without a custom shim.Updated every public workspace package manifest to declare
peerDependencies['@zintrust/core']as^0.9.2so the checked-in source package metadata now matches the publish-time caret policy and no longer uses*for the core peer.Changed the package publish transform so
@zintrust/corepeer dependencies are now rewritten to the live caret release such as^0.9.2, or*if no core version can be resolved. The release script no longer generates same-minor comparator ranges like>=0.9.0 <0.10.0during npm publish.Released the remaining public ZinTrust workspace packages on the coordinated
0.9.1patch line so all npm-published adapters and extensions move off the broken0.9.0metadata set. This includes@zintrust/d1-migrator,@zintrust/socket,@zintrust/client-rds-data,@zintrust/storage-s3,@zintrust/queue-redis,@zintrust/storage-gcs,@zintrust/queue-rabbitmq,@zintrust/cloudflare-containers-proxy,@zintrust/cloudflare-d1-proxy,@zintrust/signer,@zintrust/cloudflare-kv-proxy,@zintrust/trace,@zintrust/cache-mongodb,@zintrust/queue-monitor,@zintrust/queue-sqs,@zintrust/storage-r2,@zintrust/expose,@zintrust/workers,@zintrust/governance, and@zintrust/storage, keeping the published package line aligned on corrected@zintrust/corepeer metadata.Released
@zintrust/mail-smtp@0.9.1,@zintrust/mail-sendgrid@0.9.1,@zintrust/mail-mailgun@0.9.1, and@zintrust/mail-nodemailer@0.9.1to correct stale npm metadata from the broken0.9.0publish. The patched mail adapters keep the broad live@zintrust/corepeer range so downstream installs on@zintrust/core@0.9.0no longer fail withERESOLVEon the mail packages.Released
@zintrust/db-sqlite@0.9.1,@zintrust/db-mysql@0.9.1,@zintrust/db-postgres@0.9.1,@zintrust/db-sqlserver@0.9.1, and@zintrust/db-d1@0.9.1to correct stale npm metadata from the broken0.9.0publish. The patch line keeps the adapters on the live broad@zintrust/corepeer range so downstream installs using@zintrust/core@0.9.0no longer fail withERESOLVEon the database packages.Released
@zintrust/cache-redis@0.9.1to correct the npm metadata line after the broken0.9.0publish. The new patch keeps the adapter on the live broad@zintrust/corepeer range so downstream apps installing@zintrust/core@0.9.0no longer hit anERESOLVEconflict from the stale>=0.7.0 <0.8.0peer declaration.Added the
isMissingLike(...)helper alias on top ofisUndefinedOrNull(...)and updated the helper reference to document the intended null-like split explicitly:isNullish(...)andisDefined(...)for strict TypeScript narrowing,isNull(...)for narrower legacy null markers, andisUndefinedOrNull(...)/isMissingLike(...)for the broad compatibility missing-value bucket.Fixed the remaining future-version leak in ZinTrust package metadata and project scaffolding. Fresh app scaffolds now use the live npm
@zintrust/corerelease when lookup succeeds and fall back to*instead of guessing a future core line from governance metadata when npm lookup fails. The package publish transform now also preserves broad@zintrust/corecompatibility for published adapters instead of rewriting peers to an unpublished future^x.y.zrange, which avoids downstreamnpm installERESOLVEfailures like@zintrust/cache-redisrequiring a core version that is not live on npm yet.Tightened the shared
@zintrust/corehelper contracts around the auditedis*edge cases.isBoolean(value, true)now accepts only real booleans or boolean-like strings instead of also passing numeric1and0,isBase64(...)now rejects empty strings and requires a valid padded non-empty Base64 payload, andisUpperCase(...)/isLowerCase(...)now require at least one alphabetic character instead of treating numeric-only strings as valid case matches. Expanded the helper test suite to cover the full exported helper surface and added focused type-safety narrowing tests for the predicate helpers.
2026-04-20
Made the remaining Cloudflare proxy workspace packages publishable by removing the last
private: trueguards from@zintrust/cloudflare-kv-proxyand@zintrust/cloudflare-d1-proxyand setting their package publish access topublic, so the release tooling can ship them to npm like the rest of the package line.Added a reusable
JwtVerifierhelper for verifying externally issuedRS256JWTs with either a single JWK or a remote JWKS endpoint. The helper validates signature, issuer, audience,exp, andnbf, keeps JWKS documents in a small in-memory cache with configurable TTL, returns structured failure reasons when you want non-throwing control flow, and is exported from@zintrust/corefor both Node.js and Cloudflare Workers projects. The docs now include a dedicated public guide for Apple Sign In and other provider-token flows.
2026-04-19
Fixed Bulletproof auth for fresh/newstart apps by moving the missing device-secret path into core. ZinTrust now exposes
req.header(...)as an alias ofreq.getHeader(...), ships a built-inBulletproofDeviceStorebacked by the newzintrust_bulletproof_devicesmigration, resolves Bulletproof middleware secrets from that store by default before falling back to the shared env secret, and adds a built-inLoginFlowissuer namedbulletproofthat returns{ token, token_type, deviceId, deviceSecret }. The default auth controller and fresh-project template now use that issuer, so normal migrations are enough to make the docs flow work.Fixed CLI project-module discovery for fresh/newstart-style workspaces.
zin routesnow resolves the active project root first and loadsroutes/api.tsfrom the workspace filesystem instead of only relying on the core alias graph,ScheduleCliSupportnow prefers projectapp/Schedulesfiles before alias imports, and optional CLI extension discovery now climbs to the nearest projectpackage.jsonwhen commands are launched from a subdirectory.Stabilized the Husky pre-push
coverage:patchpath by giving a small set of import-heavy integration and worker coverage tests explicit 30s budgets, including the remaining broadcast worker coverage slice. This keeps the behavior checks intact while avoiding false-negative push failures from the default 10s Vitest timeout under aggregate patch-coverage runs.Fixed the remaining schedule CLI mixed-export discovery gap.
ScheduleCliSupportnow preserves the full project schedule module namespace when it falls back to loadingapp/Schedulesfrom project files, and the CLI schedule collector now flattens named exports plusdefaultexports consistently while deduplicating by schedule name. This meansschedule:list,schedule:run, andschedule:startno longer lose valid schedules just because a project schedule module mixesdefaultand named exports.Fixed the package release helper so repeated or partially completed manual publishes no longer crash the script with
Cannot read properties of undefined (reading 'name'). Thepublish-packagespath now keeps@zintrust/d1-migratortransform output defined even if a dependency is already on semver metadata instead offile:form, and failure reporting falls back to the package directory when transformed metadata is unavailable.Hardened the npm publish workflow against stale ZinTrust package version drift before publish.
publish-versionnow runs a dedicated preflight that re-syncs all published@zintrust/*dependency ranges from npm and retriesnpm installup to three times before failing, which catches peer-resolution conflicts such as a root app still pointing at an older@zintrust/corewhile an adapter already requires the newer release line.
2026-04-18
Fixed the restored npm publish workflow so release CI now normalizes workspace package versions and refreshes the root lockfile before dependency installation instead of failing early on a stale
package-lock.jsonself-link for@zintrust/core. This keeps publish verification aligned with the checked-in release version without letting a transient lockfile mismatch block npm publishing.Merged the remaining open local Dependabot dependency updates into the release branch by aligning the Cloudflare Containers proxy, AWS SQS and Secrets Manager adapters, and the expose package with the newer package versions and refreshing the root workspace lockfile to match.
Stabilized the release-branch full-suite and pre-push test path under loaded CI/dev environments by raising local time budgets only for a small set of import-heavy CLI, worker, Cloudflare runtime, and broadcast regression tests that were intermittently timing out during aggregate Vitest runs even though they still passed in focused execution. This keeps the real behavior checks intact while removing false-negative push failures caused by suite-level contention rather than product regressions.
Kept the publish-smoke fresh-scaffold cold-start stage and hardened it instead of removing it. The workflow now installs
tsxexplicitly with--no-saveafternpm install --omit=devso the source-firstzin start --no-watchsmoke boot still has the TypeScript runner it invokes even when scaffold app devDependencies have been pruned for the cold-start check.Hardened the release verification
publish-versionsmoke gate to match the working publish-smoke path. The release workflow now also installstsxexplicitly afternpm install --omit=dev, disables worker shutdown side-effects for the cold-start app, and forwardsTSX_TSCONFIG_PATHso the scaffold app boots against its own tsconfig instead of failing the publish-to-npm verification withtsxmissing or the wrong TypeScript file resolution context.Hardened
@zintrust/workersgraceful shutdown logging so shutdown completion no longer crashes when a consumer runtime exposes a partial logger surface whereLogger.infois unavailable late in teardown.WorkerShutdownnow logs through a best-effort level fallback instead of throwingLogger.info is not a functionduring app exit.Removed the CLI suggestion to install
tsxglobally when the local runner is missing. ZinTrust now only tells developers to addtsxto the project, which matches the supported local-runtime contract and avoids nudging CI or fresh scaffolds toward machine-global fixes.Fixed
zin newfresh-project scaffolding when the destination directory already exists but is still empty, which is a common publish-smoke setup pattern under/tmp. The scaffolder now reuses empty targets, still rejects non-empty directories unless--overwriteor--forceis set, and explicitly honorsforcein the shared scaffolder path. Verified end-to-end by rebuildingdist, creating/tmp/test-a, installing the localdistpackage into that app, pruning dev dependencies withnpm install --omit=dev, and bootingnode ./node_modules/@zintrust/core/bin/zin.js start --no-watchsuccessfully with the packaged CLI.Fixed schedule CLI source re-entry for fresh scaffold-style apps that do not ship a project-owned
bin/zin.tsorbin/zintrust.ts. When source schedule files are present, the schedule commands now fall back to the currently running packaged CLI script if needed, soschedule:list,schedule:run, andschedule:startstill work from installed@zintrust/corebuilds instead of aborting with a missing project CLI entrypoint error.Expanded the
@zintrust/tracepackage docs with explicit guidance for the reserved trace-skip log context contract. The docs now show when to useLogger.withTraceSkipContext(...), when a local wrapper such aswithTraceSkipProxyContext(...)is appropriate, and concrete examples from proxy, queue, and raw SQL transport diagnostics so developers can avoid trace-recursion noise without hiding normal application logs.Tightened
ProjectScaffoldernpm version lookups so the child process now runs with a fixed safePATHplus a small allowlist of npm/home/proxy/certificate variables instead of cloning the full shell environment, which resolves the Sonar PATH-taint finding without breaking published-version discovery. Removed the publish-smoke preinstall scaffolded dependency-range assertion block as well, since that gate had proven flaky across release runs and duplicated the real cold-start install validation that follows.Added an explicit proxy verification debug gate for the shared SQL/Redis proxy signature path. Healthy per-request
Verifying request signaturediagnostics are now suppressed by default and only emit whenZT_PROXY_DEBUGor the matching per-proxy flag such asMYSQL_PROXY_DEBUG,POSTGRES_PROXY_DEBUG,REDIS_PROXY_DEBUG, orSQLSERVER_PROXY_DEBUGis enabled. Signature verification failures remain visible, and the gated diagnostics still carry the reserved trace-skip logger metadata so proxy debugging does not reopen the trace-recursion path.Fixed source-first schedule CLI loading so
schedule:list,schedule:run, andschedule:startnow resolve project schedules through the same rooted source/bootstrap path as normal runtime startup, including source CLI re-entry for TypeScript apps using project aliases.Fixed fresh basic scaffolds and publish-smoke cold starts by restoring a local
tsxdevDependency in generated apps. New source-first projects can now boot throughzin start --no-watchafter install without relying on an unreleased framework-side loader change or altering the active release/version line.Added a reserved
__zintrustSkipTraceLoglogger metadata contract and taught@zintrust/traceto honor it before the older message-text skip list. Low-level proxy/signing/remote transport/raw SQL diagnostics and trace storage degradation warnings now mark themselves as non-traceable, which closes the current log-watcher recursion path without weakening normal application log capture.Re-enabled the repository publish entrypoints so the verified release path can publish the built core dist with
npm run pub:ciand workspace packages withnpm run release:publish-packagesagain.Fixed fresh-project scaffolding and the publish-smoke workflow so starter apps now target the live npm release line for
@zintrust/coreand@zintrust/governanceinstead of leaking the unreleased repo root version. When npm lookup is unavailable, scaffolding now falls back to the workspace's published peer line rather than the local1.0.xrepo version, and microservice scaffolds now also reuse the live governance release line if the core lookup misses while governance still resolves. Publish-smoke explicitly asserts those scaffolded dependency ranges before the localdistinstall rewrites them.Added
deduplication.collisionBehaviorto the shared queue contract and the BullMQ Redis adapter. Queue jobs can now keep the historicalsuppressbehavior for true duplicate dropping or opt intoenqueueto preserve an ordered same-key backlog while an overlap lock is already active.Hardened scaffold-time
npm viewversion lookups by forcing the child processPATHto fixed system directories and explicitly carryingNODE_ENV, which addresses the secure-process-environment warning without breaking the ProjectScaffolder type contract.Added a dedicated Database Migrations guide and wired it into the docs sidebar plus the main CLI and getting-started docs. ZinTrust migration commands were already implemented, but the guidance had been split across multiple pages; the new page now centralizes create-table generation, add-column generation, migration execution, D1 notes, and the distinction between
zin sand migration commands.Removed the dead Snyk README badge links after the public
https://snyk.io/test/github/ZinTrust/ZinTrustendpoint began returning410 Gone.Removed the default
@zintrust/d1-migratordependency from freshly scaffolded apps, since it is an optional CLI extension rather than a runtime requirement.Updated the publish smoke workflow to install only runtime dependencies for fresh-app cold-start validation, which avoids pre-publish failures on dev-only packages that have not been released yet.
Developer Docs Updates
This page tracks developer-visible documentation changes.
2026-04-17
Restored
tsxas a runtime dependency of the packaged@zintrust/coredistribution and removed the conflicting scaffolded app-leveltsxdevDependency. Fresh scaffold installs that intentionally omit app dev dependencies still rely on the framework CLI to spawn TypeScript-backed runtime entrypoints such aszin s --no-watch, so the published package now carries the loader it invokes during release smoke and CI cold-start validation withoutnpm install --omit=devpruning it back out of new apps.Isolated the Husky patch-coverage run into a dedicated temporary Vitest reports directory instead of the shared repository
coverage/output. This prevents intermittentcoverage/.tmp/coverage-*.jsonENOENT failures when another coverage-producing process or cleanup path touches the default reports directory during the pre-push gate, while leaving normalnpm run test:coverageoutput unchanged.Locked in the ORM model creation contract so
Model.create(...)is explicitly covered as equivalent tomake(...)plussave()for fillable filtering, mutators, casts, create-time observers, and accessor-visible hydrated state. The new regression coverage protects model-owned encryption, normalization, boolean coercion, and observer-assigned identifiers from drifting out of the create path.Fixed migration scaffolding so generated migration files keep importing
MigrationSchema,Blueprint, andIDatabasefrom@zintrust/corein packaged CLI builds instead of being rewritten to a relative../../index.jspath.Fixed release artifact versioning so local/dist builds now stay on the checked-in repository version instead of auto-incrementing from the latest npm-published core package. This prevents release smoke scaffolds from minting phantom versions such as
0.8.0while the repo is still on the0.7.xline.Fixed governance scaffolding to resolve the actual bundled
@zintrust/governanceversion instead of deriving it from the core version. Fresh projects now request the real governance release line and no longer generate non-existent ranges like@zintrust/governance@^0.8.0when governance has not moved in lockstep with core.Disabled npm publish entrypoints and the old publish workflow for this repository. Release verification still builds and smoke-tests the framework, but package publishing now stops with an explicit "push changes to git instead" message.
Added a first Plug & Play auth/login runtime contract through
LoginFlow. Core now exposes explicit login provider, issuer, and auditor registration, a stagedidentify() -> verify() -> issue() -> audit() -> run()flow, a built-injwtissuer backed byJwtManager.signAccessToken(...), and a built-in trace auditor for normalized success and failure audit hooks. The new docs section also now documents real auth/login Plug & Play examples instead of only a target design.Added a first Plug & Play notification orchestration contract through
Notification.compose(...). Core now exposes explicit channel registration, fluentemail()/push()/sms()/webhook()/channel()composition, required-versus-best-effort delivery policy, normalized per-channel results, and a dedicated docs page for the new composer contract.Added a first Plug & Play context assembly contract through
ContextLoader.create(). Core now exposes dependency-ordered.load(...)resolution, request-scoped resolve memoization, optional shared.batch(...)/.fromBatch(...)fan-out loading, and a new docs page for the context loader pattern.Fixed publish-time
@zintrust/corepeer rewriting for package releases so adapters such as@zintrust/db-d1now keep the active release-line peer range instead of being rewritten back to an older published core line. This preserves^0.6.0peers for the current release branch instead of emitting stale^0.5.9metadata.Fixed the root workspace lockfile self-link for
@zintrust/coreso CInpm cican validate the active0.6.0release line without treating the root package link as an unversioned dependency. The version sync script now stamps the rootnode_modules/@zintrust/corelock entry with the root package name and version and verifies that identity during--checkruns.Fixed stale Queue Monitor retry actions so retry requests now return distinct outcomes for missing jobs, non-retryable live jobs, and successfully re-queued jobs. The BullMQ driver now reports structured retry state, the retry API returns
404when a historical row points at a job that no longer exists and409when BullMQ refuses retry because the job is in the wrong state, and the package tests lock in all three paths.Extended the core ORM model surface so hydrated models expose accessor-backed attribute values on direct property reads in addition to
getAttribute(...). Accessor-backed properties now stay live after model extension and hydration, property writes still flow through mutators and casts, and rawgetAttributes()output remains unchanged for compatibility.Hardened the package release publish script so
--helpand--versionnow exit without attempting npm publishes, and package publish runs now recreate the temporary core shim before each package copy instead of assuming a prior package left that temp directory intact.
2026-04-13
- Added first-class form and custom body serialization support to the shared
HttpClient.asForm()now sends realapplication/x-www-form-urlencodedpayloads for plain-object bodies, preservesURLSearchParamsinputs without routing them through JSON first, and the request builder now supports raw body inputs such asstring,URLSearchParams,FormData, andDELETErequest bodies across the standard verbs. A newasCustom(...)mode lets applications provide their own serializer and content type for provider-specific request formats while keeping the shared fluent client and trace instrumentation path. - Fixed stale persisted worker auto-start cleanup in
@zintrust/workers. When a persisted worker record still points at a deleted local processor module, startup now tags that unresolvedprocessorSpecas stale persisted metadata, purges the dead record from persistence, reports the outcome as a skipped purge instead of a normal auto-start failure, and keeps boot moving for the remaining workers. Worker removal is now also idempotent for this cleanup path, so repeated purge attempts do not fail if the persisted record was already removed earlier in the same lifecycle. - Hardened the
@zintrust/tracecontent-budget hot path so deferred trace writes now yield to the next event-loop turn instead of running from a microtask.TraceContentBudget.wrapStorage(...)now schedules queue enqueue and fallback persistence through aMessageChanneltask boundary, keeps the returned write/update promise tied to the real deferred dispatch result, and uses bounded top-level field dropping instead of the older recursive droppable-path search when queued worker compaction still has to fit oversized content. The package tests now lock in both the next-turn ordering and the restored promise semantics. - Added distinct branded SVG favicons for the built-in Workers UI, Telemetry dashboard, and Queue Monitor pages so developers can identify each ZinTrust browser tab by icon at a glance. Each page now keeps the shared ZinTrust mark but overlays a page-specific symbol in the favicon while leaving the on-page branding unchanged.
2026-04-12
- Changed
@zintrust/tracecontent-budget writes to fail open instead of compacting oversized payloads inline on the request path. Trace writes now return immediately, can offload through a configured trace queue driver and internal drain worker, and when no trace queue is configured oversized content is replaced with a shortTrace content exceeded budget and was replaced.notice before persistence instead of running the expensive compaction loop during live requests. - Fixed the package publish order for
@zintrust/d1-migratorso its npm manifest no longer rewrites local database adapter dependencies to whatever stale versions happen to be on the registry at publish time. Release publishing now forces thedb-d1,db-mysql,db-postgres,db-sqlite, anddb-sqlserverpackages to publish befored1-migrator, andd1-migratornow refuses to publish unless those adapters are already live on npm at the exact current release version. - Fixed two core release blockers ahead of the
0.5.1npm publish.Router.any()now registersOPTIONSalongside the other HTTP methods so CORS and wildcard handlers can match preflight requests, andRemoteSignedJsonnow sendsConnection: closeon outbound signed JSON proxy calls to avoid the install-time patch downstream projects were carrying against@zintrust/core@0.5.0. - Fixed the built-in trace request detail view so related batch tabs such as Cache, Queries, Logs, Exceptions, HTTP, Middleware, and Models no longer hydrate the full request batch up front. Opening a traced request now fetches only batch counts first, each related tab loads its own first page with a default page size of 10 entries, and large batches can page forward without forcing the browser to deserialize all captured cache/query/log payloads at once.
- Changed release PR automation to use conventional version bumping again, so release CI now honors
fixas patch,featas minor, and breaking changes as major instead of forcing every releasable change into a patch bump. - Added explicit custom carry rules for ZinTrust release numbers so CI now treats the version segments as bounded release digits instead of unbounded SemVer counters. Patch bumps now roll
x.y.99 -> x.(y+1).0, and minor carry now rollsx.9.99 -> (x+1).0.0instead of producingx.10.0. - Fixed the remaining TypeScript 6 package-local publish builds for
@zintrust/socket,@zintrust/queue-monitor,@zintrust/queue-redis,@zintrust/storage, and@zintrust/workers. The affected packages now add the explicit callback and collection element typing that standalonetsc -p tsconfig.jsonrequires during npm publish, so the release publish queue no longer stalls on implicit-anyerrors after the TS 6 config cleanup. - Removed the temporary TypeScript 6 deprecation suppression from the root tsconfig.json by dropping the deprecated
baseUrl,downlevelIteration, andignoreDeprecationsoptions. The remaining workspace-only imports that had been relying onbaseUrlwere converted to explicit@zintrust/*package aliases and path mappings sonpm run type-checkstays clean on TypeScript 6 without config suppression. - Fixed the built-in trace dashboard entries runtime path so
GET /trace/api/entriesnow returns compact summary rows instead of full nested trace payloads in list mode. Request-heavy views such as/trace?page=entries&type=requestnow omit large request and response bodies from list responses, include lightweight detail metadata, and enforce a tighterperPagecap for request rows to keep dashboard serialization bounded under load. - Fixed the inline trace dashboard document so the runtime script no longer contains stray duplicated CSS. This removes the browser-side
Unexpected token '.'failure on/trace?page=entries&type=requestand lets the entries page boot normally again.
2026-04-11
- Temporarily disabled the new raw-fetch outbound trace capture path for internal service integrations such as SMS, mail, storage, and internal broadcast HTTP while investigating request hangs under the expanded
client_requesttracing rollout.HttpClienttracing remains available, buttracedFetch(...)andsafeFetch(...)now fall back to plain fetch behavior for this test release. - Made System Trace startup failures non-fatal for application boot. When trace runtime initialization fails, ZinTrust now logs the failure, disables trace for that boot, and continues starting the app instead of aborting the full runtime.
- Improved the built-in trace dashboard request experience. Request rows now use HTTP method labels such as
GetandPostin the Type column, request summaries no longer repeat the method name, and related request entries now render collapsed by default so developers can expand the specific query, middleware, model, log, exception, HTTP, cache, or other item they need. - Extended request trace correlation to include route middleware and ORM model activity. The request detail view now shows attached route middleware, exposes dedicated Middleware and Models tabs, records route middleware execution inside the request batch, and emits model create/update/delete entries into the same request trace context for easier end-to-end debugging.
2026-04-09
- Normalized null-like database read values across the shared ORM boundary so database results that come back as the literal strings
NULL,null, or trimmed variants now reach application code as realnullvalues instead of string sentinels. This applies to the core runtime database manager and the public D1, MySQL, and PostgreSQL adapter packages, keeping read behavior consistent across supported databases. - Fixed trace storage failures on large payloads by compacting oversized trace content before persistence. When a request or response body exceeds the trace storage budget, ZinTrust now preserves the rest of the trace entry and replaces the oversized field value with an explicit dropped-value notice instead of sending a too-large storage write that can fail on proxy-backed databases such as the MySQL proxy.
- Fixed the stock CORS middleware so Electron and other browser clients with custom preflight headers no longer get blocked on local API calls. Preflight
OPTIONSresponses now mergeAccess-Control-Request-Headersinto the configured allow-list instead of dropping headers such asX-Requested-Withor app-specific IDs likez-client, while non-preflight requests keep the configured CORS header set unchanged. Wildcard env overrides such asCORS_ORIGINS=*,CORS_METHODS=*,CORS_ALLOWED_HEADERS=*, andCORS_EXPOSED_HEADERS=*now also behave as real allow-all developer overrides instead of partially bypassing CORS only for origins. - Fixed another SQLite trace self-recursion path in core by suppressing adapter-level
SQLite query executedlogs when the SQL targets trace storage tables such aszin_trace_entries,zin_trace_entries_tags, orzin_trace_monitoring. This closes the remaining infinite-loop case where trace writes could still re-enter the log watcher through generic SQLite query logging and continuously append newtype=logtrace rows. - Raised the repo-wide
axiosoverride to^1.15.0so the root SonarQube scanner toolchain no longer resolves the critical SSRF-vulnerable<1.15.0line duringnpm audit. This keeps the currentsonarqube-scanner@4.3.5workflow intact while forcing the safe Axios patch level in the core workspace install used by CI and release checks. - Unified worker Redis key-prefix resolution behind a single shared generator in
@zintrust/workers. Worker persistence, auto-start discovery, and DLQ/audit keys now all flow through the same prefix helpers, and legacy overrides such aszintrust:workers:or olderworker_*forms are normalized back to the app-based${Normalize(APP_NAME)}_zintrust:workers:namespace to avoid mixed-prefix startup behavior. - Hardened
@zintrust/workersapp-name normalization for default Redis worker key prefixes by removing the regex-based boundary-underscore trim in favor of linear scans. This keeps the new${Normalize(APP_NAME)}_zintrust:workers:contract while avoiding the super-linear backtracking pattern SonarQube flagged in worker startup config. - Fixed the published
@zintrust/storage/registerESM entrypoint so the documentedimport '@zintrust/storage/register'path now resolves cleanly under Node ESM. The storage package source now emits.js-suffixed relative imports for the multipart registration surface, and the package-local build now runs the shared ESM import fixer before publish sonpm publishcannot overwrite the valid entrypoint with extensionless specifiers. - Changed the default Redis worker persistence key for
@zintrust/workers. New starts now default to${Normalize(APP_NAME)}_zintrust:workers:instead of the olderworker_<appPrefix>hash key shape, so worker registry state is namespaced by the normalized application name and no longer drifts into keys likezintrust:workers:_worker_vi.... ExplicitWORKER_PERSISTENCE_REDIS_KEY_PREFIXoverrides now remain authoritative as-is. - Fixed
@zintrust/storagemultipart bootstrap and Node upload-abort handling. The documentedimport '@zintrust/storage/register'entrypoint now registers the streaming multipart parser as a real side effect instead of only re-exporting the helper, and the Busboy-backed parser no longer treats every requestcloseas an abort whenreq.complete === true. This restores valid authenticated multipart uploads that previously failed downstream withUpload abortedand empty validation payloads. - Fixed a trace self-recursion path on SQLite after trace migrations are present. The trace query watcher now excludes
zin_trace_entries_tagsalongside the other trace tables, and the trace log watcher now skips adapter query-execution logs when the logged SQL targets trace storage tables. This preventsTRACE_ENABLED=trueplus SQLite query logging from turning trace writes into an unbounded stream of repeatedSQLite query executedinserts. - Corrected the bottleneck and memory-retention analysis in [report/bottlenecks-memory-leaks-analysis.md] so it now reflects only verified code facts. Implemented the corresponding fixes in core: plugin dependency installs and opt-in post-install commands now run asynchronously via
SpawnUtilinstead ofexecSync, microservice discovery now uses async filesystem reads forservice.config.jsontraversal, and the PostgreSQL adapter manager now exposesreleaseInstance(key)for targeted cached-adapter cleanup.
2026-04-08
- Refreshed the Nodemailer adapter dependency metadata to pick up
nodemailer@8.0.5, which clears the moderate SMTP command-injection advisory (GHSA-vvjj-xcjg-gr5g) in both the root workspace install and the package-local@zintrust/mail-nodemailerlockfile used for package-level audits. - Fixed the Cloudflare Worker proxy trace path so the built-in D1 and KV proxy entrypoints no longer pull the optional dynamic-import system trace bridge into Wrangler service bundles. Worker-safe proxy tracing now uses a dedicated bridge path, which avoids the recent
Unexpected reserved wordstartup failure inZintrustD1Proxy.jswhile keeping D1 and KV proxy trace emission available when a worker trace bridge is registered. - Improved proxy-backed trace failure diagnostics for MySQL storage writes. Core now preserves attached proxy response details in
[MySQLProxyAdapter] Proxy request failedand[trace] Trace storage write degradedlogs, so transport failures include the underlying proxy code/message instead of collapsing everything to a genericMySQL proxy errorstring. - Extended trace into proxy execution paths. When trace is enabled in the proxy runtime, MySQL/PostgreSQL/SQL Server/D1 proxy requests now emit SQL trace entries with the final statement plus bindings, and the SMTP proxy now emits mail trace entries including text and HTML content. This complements the
TRACE_QUERY_CONNECTIONfallback so proxied transports stay visible whether queries run through the app DB facade or directly inside a proxy. - Fixed SQL trace capture when trace storage and application data use different database connections.
TRACE_DB_CONNECTIONnow remains dedicated to trace storage, whileTRACE_QUERY_CONNECTIONcan target the application connection whose final SQL statements and bindings should be observed. IfTRACE_QUERY_CONNECTIONis omitted and trace storage uses a separate connection, ZinTrust now automatically observes the mainDB_CONNECTIONinstead of accidentally subscribing only to the trace database. - Expanded trace payload capture and queue-monitor efficiency. Outbound HTTP client traces now include request bodies, response headers, response bodies, and failed-call errors; cache traces can include payloads when
TRACE_CACHE_PAYLOADS=true; SQL query traces now keep bound values by default but can hide them withTRACE_QUERY_BINDINGS=false; mail and notification traces now persist rendered content for richer dashboard inspection; and the trace dashboard renders those richer payloads directly, including HTML mail previews. Queue Monitor SSE subscribers with the same selection now share one polling snapshot pipeline instead of recomputing the same snapshot, recent jobs, and lock analytics per browser connection. - Mirrored the direct proxy command env-default wiring across ZinTrust so
zin proxy:mysql,zin proxy:postgres,zin proxy:redis,zin proxy:smtp,zin proxy:mongodb, andzin proxy:sqlservernow all resolve the nearest project root, load root.envplus cwd overrides before option registration, and read liveEnv.get*values when building CLI defaults. This removes the remaining staticEnv.*snapshot dependency from direct proxy option wiring and keeps proxy defaults aligned with consumer-repo env updates. - Fixed a trace self-recursion path when trace storage writes fail through the MySQL proxy. The trace log watcher now ignores core transport-failure logs such as
[MySQLProxyAdapter] Proxy request failedand the trace degradation advisory itself, so a single proxy403no longer turns into an unbounded stream of trace-triggered proxy retry noise. - Ported the rooted local Wrangler proxy-config flow from the newstart fix into core.
zin proxy:d1andzin proxy:kvnow write their temporary dev config as.zin.proxy.<env>.jsoncin the project root, rewrite the generated proxy entrypoint paths to root-relative./src/..., and materialize Wrangler dev vars from that rooted launch context. This avoids the old path/cwd mismatch around.wrangler/tmptemp configs in consumer repos. - Fixed the global CLI bootstrap ordering so env files now load before the CLI imports modules that read static
Env.*values. This restores project-owned proxy defaults such asMYSQL_PROXY_HOST,MYSQL_PROXY_KEY_ID, and related signing config when running commands likezin proxy:mysqlfrom consumer repos instead of falling back to framework defaults too early. - Added an explicit
zin proxy:d1startup warning when the resolved project env still does not provideD1_REMOTE_SECRETorAPP_KEY. The proxy can still boot under Wrangler local dev, but ZinTrust now tells developers up front that signed requests will fail with401 CONFIG_ERRORuntil one of those signing-secret inputs is present. - Fixed shutdown log ordering so ZinTrust only reports
Application shut down successfullyafter bootstrap has finished tearing down tracked Redis connections. Previously the inner runtime shutdown logged success before Redis teardown started, which made shutdowns look stuck even when cleanup was still in progress. - Fixed the core Cloudflare D1 proxy entrypoint so
zin proxy:d1again starts under Wrangler local dev without pulling the full framework logging/helper runtime into the Worker bundle. The built-insrc/proxy/d1/ZintrustD1Proxy.tsentrypoint now stays Worker-safe like the standalone package implementation, which avoids the recentUnexpected reserved wordstartup failure inZintrustD1Proxy.js. - Fixed
@zintrust/tracerequest correlation and entry filtering so every monolith request now gets a stable trace batch ID even when no inbound trace header is present, which restores related request tabs such as Queries, Logs, Exceptions, HTTP, Cache, and Other instead of fragmenting them into unrelated batches. The trace config now also supports contains-based include/exclude filters per watcher and per inbound request method, such asrequest.get.exclude(['report'])semantics viawatchers.request.get.exclude = ['report'], and the dashboard now exposes tag filters as real links for new-tab workflows, gives GET/POST/other requests distinct colors, shows Cache as its own request-detail tab, and renders captured response bodies when available. - Updated the CLI launcher so a global
zinbinary now hands off to the project-localnode_modules/@zintrust/coreinstall when one exists above the developer's working directory, which keeps normalzin *commands aligned with the repo-local runtime and leaves the global install only as a fallback when no local ZinTrust package is present. - Clarified
@zintrust/tracemonitoring tags in both the dashboard UI and package README with direct examples such asauth,checkout,queue:emails, andnightly-sync, and explained that monitoring tags are saved filter shortcuts rather than stored trace mutations. - Fixed the fresh basic-project scaffold so generated
tsconfig.jsonfiles now use a TypeScript-compatibleignoreDeprecationssetting again, which restoresnpm run type-checkin clean starters created with the current CLI template.
2026-04-07
- Hardened
scripts/ci/install-deps.shfor release-line workspace installs. CI now retriesnpm ciwith--legacy-peer-depsbefore falling back tonpm install, which prevents fresh checkouts from failing when workspace packages temporarily peer on a newer local@zintrust/coreline than the one already published to npm. - Fixed release workspace version sync so package
peerDependencieson@zintrust/corenow follow the local repo core version during monorepo installs and CI, while package publish still rewrites those peers to the currently published npm core line. This removes the recurringERESOLVE overriding peer dependencynoise fromscripts/ci/install-deps.shon release branches before the new core version is live on npm. - Updated the shared Wrangler proxy launcher so
zin proxy:d1andzin proxy:kvnow load the developer root.envbefore resolving proxy defaults and also materialize Wrangler.dev.varsfrom that same root env during local dev. This fixes the recent behavior where proxy commands were falling back to generated defaults instead of honoring root env values such as app signing/config secrets. - Fixed the global
zinlauncher handoff so commands likezin snow wait for the project-local CLI child to finish shutting down before the wrapper exits. This avoids the recent Ctrl+C behavior where the shell prompt returned early while the handed-off local watcher process was still printing shutdown logs. - Hardened
@zintrust/traceredaction so sensitive values are masked before persistence, not just in selected watchers. Trace content masking is now recursive, masked values are stored as****, default sensitive key coverage includes common auth/card/session fields, and developers can extend the masked key lists throughconfig/trace.tsor theTRACE_REDACT_KEYS,TRACE_REDACT_HEADERS,TRACE_REDACT_BODY, andTRACE_REDACT_QUERYenv vars. Worker startup config loading now includesconfig/trace.tsas well. - Reduced duplication in the trace CLI command wiring by centralizing shared D1 option registration, trace command construction, and named connection resolution in [src/cli/commands/TraceCommands.ts]. This keeps the trace command surface unchanged while improving Sonar duplication on new code.
- Fixed
@zintrust/traceSQL write compatibility and diagnostics for MySQL-backed installs. Fresh trace entry tables now createcreated_atas a 64-bit integer, a new follow-up trace migration widens existing SQLcreated_atcolumns toBIGINTwhere needed, tag/monitoring inserts now use dialect-safe ignore syntax instead of SQLite-onlyINSERT OR IGNORE, and runtime trace storage writes now emit rate-limited degradation warnings instead of failing silently when the backend rejects trace inserts. - Fixed migration tracking compatibility for legacy SQL
migrationstables during package migrations such aszin migrate:trace. Core now detects older schemas that still use a requiredmigrationcolumn, writes bothnameandmigrationwhen needed, treats legacy rows as completed-only tracking, and rejects scoped/service-specific tracking cleanly when the old table shape cannot represent it. - Fixed the generated
src/zintrust.plugins.tsandsrc/zintrust.plugins.wg.tstrace stub handshake so they now publish the same__zintrust_system_trace_*globals that core boot checks before auto-mounting the trace dashboard. This restores the stockTRACE_AUTO_MOUNT=truepath for/traceafter trace/plugin regeneration instead of silently leaving the dashboard unavailable. - Added an explicit stock-bootstrap trace dashboard activation path with
TRACE_AUTO_MOUNT=true. Core boot now keeps runtime registration and dashboard exposure separate by default, but it can auto-mountregisterTraceDashboard(...)atTRACE_BASE_PATHwith optionalTRACE_MIDDLEWAREwhen that env flag is enabled, which removes the old partial-success trap where trace storage was active but/tracestill returned404. - Added a shared CI install fallback at
scripts/ci/install-deps.sh. Root workflows now trynpm cifirst and automatically fall back tonpm installwhen npm reports lock/package sync drift such as missing internal@zintrust/coreentries, so CI self-heals instead of stopping onEUSAGE. - Fixed the release/CI version sync flow so internal
@zintrust/*peer, dependency, and devDependency ranges stay pinned to currently published npm versions instead of drifting to an unpublished future version such as0.4.75before@zintrust/coreis actually live. CI, smoke, SonarQube, and security workflows no longer auto-bump the root package ahead ofnpm ci. - Scoped queue deduplication locks by queue name in core and
@zintrust/queue-redis, so the same logicaldeduplication.idcan now be reused safely across different queues while still deduplicating true duplicates inside the same queue. Worker-sidereleaseAfterlock cleanup now uses the same queue-scoped storage key contract. - Fixed the release package-publish shim for
@zintrust/coreso package-local publish builds can type-check and run against the newresolveDeduplicationLockKey(...)export while publishing affected packages such as@zintrust/queue-redis.
2026-04-05
- Updated the Cloudflare Worker scaffold to include the non-secret runtime vars and env-local bindings needed for first-request boot in new deploys, and relaxed startup secret validation so
ENCRYPTION_CIPHERis no longer treated as universally required in production. ZinTrust now only blocks onENCRYPTION_CIPHERwhen encrypted-envelope interoperability is actually enabled by encryption-specific env such asENCRYPTION_CIPHERitself orAPP_PREVIOUS_KEYS. - Relaxed strict startup env validation so non-critical runtime vars such as
APP_NAME,HOST,PORT/APP_PORT,BASE_URL,LOG_LEVEL, andLOG_CHANNELnow surface as startup warnings instead of fatal config errors whenSTARTUP_REQUIRE_ENV=true. Critical startup requirements such asNODE_ENV,DB_CONNECTION, andAPP_KEYremain blocking, and Cloudflare startup failures now log structured config errors, warnings, and startup health report details to make missing Worker runtime env easier to diagnose. - Added development-safe Redis lifecycle tracking in core so subsystem-scoped direct Redis clients can be reused across non-production Node reloads, framework shutdown now drains tracked Redis clients before exit, and both app/bootstrap and worker shutdown flows respond to
SIGUSR2hot-reload restarts to reduce BullMQ/worker Redis zombie connections during local watch mode. - Added first-class HTTP bridge broadcast support for isolated worker/container runtimes. Core now supports both automatic
inmemorybridge forwarding in isolated runtimes and an explicithttp-bridgebroadcaster, so cross-process local socket delivery no longer requires application-level proxy wrappers. - Added compatibility fallback from
TIME_ZONEtoAPP_TIMEZONEand wired scheduler cron defaults to inherit the configured app timezone instead of hardcodedUTCwhen a schedule does not specify its own timezone. - Updated the D1 migrator to normalize null-like string values such as
NULLandnullinto real SQLNULLduring data migration and schema default-value generation, preventing those sentinel strings from being preserved as quoted text in D1. - Hardened
@zintrust/queue-redis/registerso official plugin auto-imports no longer treat a partially initialized coreQueueexport as a hard import failure; the Redis queue driver now registers only when the core queue registry API is actually available. - Fixed the advanced queue enqueue path so
AdvancedJobOptions.jobIdandAdvancedJobOptions.uniqueIdare forwarded into the shared queue payload when not already set there, while preserving explicit payload identifiers as the authoritative values. - Clarified queued broadcast delivery in core so queued payloads treat
channelsas the authoritative resolved target list, keep legacychannelonly as derived compatibility metadata, and ensure framework-owned broadcast workers publish fromchannelswhile preserving socket, delivery, and broadcaster metadata. - Added strict helper type guards
isNullish(...)andisDefined(...)so application code can get correct TypeScript narrowing fornull | undefinedchecks without changing the legacy null-like semantics ofisUndefinedOrNull(...). - Enabled fresh-project request-path logging by default, added scaffolded
LOG_COLOR=trueandLOG_COLOR_THEME=arcticentries for colored text request logs, and aligned the documented logging env defaults with the runtime behavior. - Hardened
Broadcast.publish(...)so core now normalizeschannelScope, tries the package-owned internal socket publish route before falling back to in-process socket or driver delivery, reports explicit transport attempts includinginternal-http, and surfaces clearer official-plugin auto-import failure details when optional packages are missing or broken. - Added named request-log terminal color themes with
LOG_COLOR_THEME, setarcticas the default palette, and documented all five supported theme options plus the standalone visual palette sheet for developer preview. - Added a framework-owned
Broadcast.publish(...)/Broadcast.publishLater(...)surface that prefers the active socket runtime automatically when available, kept the older broadcast helpers as compatibility aliases, updated queued broadcast processing to use the new object-based publish contract, and rewrote the broadcast docs/scaffolds so normal application code no longer needs custom publish helpers or a default/broadcast/sendbridge. - Updated the release version-sync flow so root and dist internal
@zintrust/*dependency pins now resolve to the currently published npm version for each workspace package, falling back to the local workspace version only when a package has not been published yet. This prevents release metadata from pointing core or dist consumers at an unpublished next patch such as0.4.62when npm still only has0.4.61. - Removed
@zintrust/workersfrom the root core runtime dependencies so worker support is install-on-demand again, and narrowed the official runtime auto-import sweep to packages explicitly selected by env/config signals instead of warning about every optional adapter package that is not installed.
2026-04-04
Fixed socket bootstrap ownership for published consumers.
@zintrust/core/startno longer re-exportsZintrustSocketHub, which avoids published core builds resolving@zintrust/socketthrough internal workspace paths likepackages/socket/src/index.jsin downstream apps, while the Cloudflare worker entry continues to expose the durable object from@zintrust/socketwhere it is actually needed.Updated Node bootstrap to always try the official base plugin auto-import set before project-local plugin files, so plain
zin sno longer depends onsrc/zintrust.plugins.tsto discover built-in optional packages such as@zintrust/socket/register.Relaxed socket compatibility route registration for
POST /broadcasting/authso apps with an existing broadcast auth endpoint can keep their own handler when sockets are enabled instead of failing bootstrap with a reserved-route conflict.Fixed repository test and coverage flows so importing the governance ESLint config no longer depends on a previously patched local ESLint install. Vitest setup and pretest hooks now apply the Ajv draft-04 compatibility patch before governance config tests run, matching the existing lint-time workaround used for ESLint 10 with Ajv 8.
Fixed queue-monitor recent job visibility for Redis/BullMQ workers at the package level.
@zintrust/workersnow records completed and failed recent-job history for both BullMQ event-driven workers and pull/dequeue-ack workers using the shared@zintrust/queue-monitormetrics contract, and@zintrust/queue-redisnow finalizes acked pulled jobs as completed instead of deleting them immediately so Recent Jobs fallback queries can still see them.Hardened the unified socket compatibility surface so
POST /broadcasting/authis now framework-owned by default with configurable auth middleware, strict default authorization forprivate-*andpresence-*channels, optional application takeover behindSOCKET_ALLOW_AUTH_ROUTE_OVERRIDE=true, startup-fatal reserved-route conflict detection instead of silent app-route shadowing, and a new project-levelbroadcast.socket.publishpolicy hook that can approve, reject, or rewrite server-side publish requests before fan-out.Fixed the shared
@zintrust/core/startCloudflare entry so lazy worker imports now resolve module-namespace default exports correctly instead of falling through to a non-function call path under Wrangler after additional named exports are present.Added a unified optional socket runtime surface for ZinTrust. Core now exposes socket runtime contracts and registry hooks, auto-discovers
@zintrust/socket/register, intercepts Nodeupgraderequests and Worker websocket requests before the HTTP adapter path, and the new@zintrust/socketpackage provides zero-touch Pusher-compatible upgrade/auth/publish endpoints for local in-memory broadcast flows across Node and Cloudflare runtimes.Relaxed the default
zin newESLint scaffold so freshly generated apps no longer fail on relative imports just because the governance preset prefers ZinTrust path aliases. The governance ESLint preset now exposes anenforcePathAliasesswitch, and the generated app config disables that rule by default while still using the shared preset.Fixed framework-managed CORS preflight handling so
OPTIONSrequests now terminate with an empty204response instead of leaving browser preflight checks hanging after the status code is set.Added a monolith env-precedence gate for manifest-backed microservices. When
RUN_AS_MONOLITH=true,zin start/zin sand manifest route registration now keep root env values authoritative for duplicate keys while still loading service-local env files to fill missing values.Fixed
zin start/zin sNode startup so importing@zintrust/core/startno longer eagerly links the Worker, Deno, and Lambda handlers before root env loading completes. The Nodestart()path now lazy-loads those non-Node runtime handlers, which prevents fresh projects from caching fallback config values too early and restores env-driven features such as/queue-monitorunder the CLI start path.Updated fresh project scaffolding to generate a default flat ESLint config backed by
@zintrust/governance/eslint, add a defaultlintscript, and place botheslintand@zintrust/governancein devDependencies instead of leaving governance tooling unconfigured by default.Fixed the public
@zintrust/core/bootNode startup path so it now loads project env files before importing the stock bootstrap lifecycle, matching the existing CLI/bootstrap env parser behavior instead of starting with fallback defaults when apps use the thinsrc/boot/bootstrap.tswrapper directly. The boot entry now also emits one structured warning when no env files were loaded for that Node bootstrap path.Fixed fresh Node startup queue-monitor registration so the runtime now prefers the preloaded project
config/queue.tsoverride fromStartupConfigFileRegistrybefore falling back to cached framework defaults or generated runtime config. This keeps/queue-monitoraligned with the same app-owned queue settings used during startup instead of disappearing when only the fallback config hadmonitor.enabled=false.Unified Node startup around a shared env-first path so
@zintrust/core/start,@zintrust/core/boot, andzin start/zin sno longer rely on separate Node bootstrap wrappers. Root project env files now load through one singleton helper before any bootstrap import, and CLI Node starts run through generated@zintrust/core/startrunners instead of executing the project bootstrap file directly.
2026-04-03
- Fixed package Docker and CI builds so workspace package builds no longer run redundant package-local
npm installsteps that can trigger npm workspace-filter warnings or unpublished-package resolution failures such as@zintrust/governance in filter set, but no workspace folder presentandETARGETfor internal packages. The package build orchestrator now reuses the root workspace install by default and only performs a package-local install whenFORCE_PACKAGE_INSTALL=trueis explicitly set. - Fixed local worker dashboard registration so
/workersand/queue-monitornow mount in the normal Node runtime even whenWORKER_ENABLED=false, while worker execution-only RPC gateways still stay disabled until worker mode is explicitly enabled. Also reduced noisy D1 lifecycle logging to debug level and stopped the System Trace query watcher from recording its ownzin_trace_*storage SQL. - Fixed Queue Monitor live dashboard stability.
@zintrust/queue-monitorcan now merge a stableknownQueuesinventory into snapshots, the core runtime now feeds that inventory from persisted worker records, per-client SSE polling no longer shares queue selection across subscribers, and the dashboard preserves the selected queue while automatically hard-resetting the page only after the stream stays stale long enough to get out of sync. - Improved ORM relation-bootstrap diagnostics so model methods that touch the database during
Model.define(...)now emit one structured warning with the model table, relation name, and first probable user-code source frame instead of repeated genericDatabase connection 'default' is not registerednoise. Added opt-inZINTRUST_DEBUG_RELATIONS=1tracing for per-relation bootstrap probes. - Fixed published package compatibility between
@zintrust/coreand@zintrust/workers. The generateddist/package.jsonfor core now pins workspace package dependencies like@zintrust/workersto the exact released version instead of a floating caret range, preventing older published core releases from resolving a newer workers patch with a stricter peer requirement. The workers package release sync now also keeps its@zintrust/corepeer compatible across the active0.4.xline sonpm install -g @zintrust/coreand similar fresh installs do not fail withETARGETwhen workers is published ahead of core.
2026-04-02
- Fixed
@zintrust/tracemigration packaging so the published package now exports runnable JavaScript migrations from./migrationsinstead of relying on TypeScript files innode_modules. The core trace migration command now resolves trace migrations as a package target with an explicit extension, prefers built JS when available, and fails with a packaging-specific error if an installed trace package still exposes TS-only migrations. - Split
@zintrust/traceactivation so plugin/bootstrap loading now registers runtime watchers only, while dashboard UI/routes are an explicit route-level opt-in. AddedregisterTraceDashboard(router, options)for the commonroutes/api.tscase, added a lightweight@zintrust/trace/uiexport so route code does not need to import the package root re-export surface, removed the stock core auto-mount behavior, and clarified trace route exposure in the CLI/package docs. - Added a dedicated
npm run lint:strictscript and switched CI/publish verification to it so the repository no longer relies on the deprecatednpm run lint --max-warnings=0form that newer npm versions warn about. Usenpm run lint:strictornpm run lint -- --max-warnings=0for zero-warning ESLint runs. - Fixed the pre-build npm workspace install topology for unpublished core versions. The root
package-lock.jsonnow keeps the local@zintrust/corelinks pointed at the repository root package instead ofdist, thedistlock entry stays version-synced with the root package metadata, andscripts/release/sync-package-versions.mjs --checknow fails if either lockfile edge drifts. This preventsnpm ci --ignore-scriptsfrom fetching an unpublished@zintrust/core@^...and failing release/CI installs withETARGET. - Added a
Model.with(relations)static shorthand on defined models so developers have three equivalent eager-loading signatures:Model.with(['rel1', 'rel2'])(array shorthand that starts a fresh query),Model.query().with('rel1').with('rel2')(chained), andModel.query().with({ rel1: constraint, rel2: constraint })(constrained object). Updated the eager loading section indocs/models.mdwith examples of all three signatures.
2026-04-01
- Added stable outbound trace
sourcenames for core HTTP integrations such astermii,twilio,slack,sendgrid,mailgun,ses,s3, andpusher, and extendedwatchers.clientRequestconfig so projects can include, exclude, or fully disable specific outbound sources as well as suppress selected request/response sections per source. - Replaced regex-based query redaction and stack-frame parsing in
@zintrust/tracewith deterministic scanners so CodeQL no longer flags ReDoS-prone handling on trace query strings, exception traces, or job failure traces. Also re-synced the trace/default database connection fallback so literalDB_CONNECTION=defaultresolves to the active runtime default connection whileTRACE_DB_CONNECTIONstill overrides trace migrations and runtime storage when explicitly set. - Hardened ORM eager loading so
belongsTonow batches on the parent foreign key and related owner key,belongsToManyfollows the pivot-join resolution path during eager loading, and lazy-vs-eager parity coverage now spans standard, polymorphic, and through relations pluswithCount(...)support for the currently counted relation types. - Fixed core ORM hydration and model-instance write semantics so
first()andfirstOrFail()now return hydrated models likeget()andpaginate(), rawhydrate(...)no longer re-runs mutators on stored values, andsave()now persists model-instance inserts and dirty updates through the query builder with mutator-transformed values intact. - Added a reusable core Wrangler local-dev env materialization path driven by
.zintrust.jsonCloudflare env groups. ZinTrust can now generate manifest-scoped.dev.varsfiles for Workers through the CLI, and the Wrangler start flow reuses the same resolver instead of maintaining a separate transient-only implementation. - Added a dedicated
zin wrangler:dev-varscommand so Cloudflare local-dev env generation is available as a first-class CLI workflow instead of only as aprepareoption. - Tightened the
@zintrust/tracerequest-context bridge so trace batching, auth-tag correlation, and route filtering now read the live request context synchronously during runtime hooks. The trace now skips its own/trace/*traffic across watcher emissions instead of recursively recording dashboard requests, SQL writes, and related log noise. - Improved the inline
@zintrust/traceentry detail views so structured JSON payloads and SQL statements render with type-aware syntax colors plus one-click copy actions, and surfaced execution duration more consistently across request, query, outbound HTTP, and other timed trace entries. - Refreshed the inline
@zintrust/tracedashboard shell to match the rest of the ZinTrust admin UI more closely: it now uses the shared Inter-based dashboard font stack, swaps the old sidebar-heavy Telescope note for a responsive header-plus-tabs layout, embeds thedocs-website/brand/prism-shield-pulse-core.svgmark as the visible logo and favicon, and adds built-in light/dark mode support for the trace experience. - Fixed the plugin-driven
@zintrust/traceboot path so it no longer recurses back throughgetKernel()while the application is already booting. ZinTrust now queues trace global middleware registrations through the kernel itself, which prevents repeatedDatabase connection 'default' is not registerednoise during Worker reloads and keeps the optional trace package buildable again after the logger/watcher import cleanup. - Fixed the trace connection fallback so both the core auto-mount path and
@zintrust/trace/registernow inherit the app's activeDB_CONNECTIONwhenTRACE_DB_CONNECTIONis omitted, instead of forcing the literal registry keydefault. This restores the documentedTRACE_ENABLED=truelocal setup for D1-backed Worker apps and avoids the oldRequesting connection: defaultfailure path. - Updated
@zintrust/tracesetup guidance so the supported activation path now goes throughsrc/zintrust.plugins.tsandsrc/zintrust.plugins.wg.tsvia@zintrust/trace/plugin, instead of telling developers to wire trace bootstrap imports into ad hoc start files. The core runtime now only lazy-mounts the trace dashboard after that explicit plugin opt-in is present, and the inline dashboard shell was refreshed toward a lighter request-trace layout while removing the brokenshowPageinline-handler bug.
2026-03-31
- Added first-class optional CLI registration for
@zintrust/trace, includingzin migrate:trace,zin trace:status,zin trace:prune, andzin trace:clear, and wired the stock runtime boot path to auto-mount the trace dashboard whenTRACE_ENABLED=trueso the package can be enabled and inspected live without hand-editing the example app routes. - Added a packed Cloudflare secret compatibility mode to the core env surface. When
USE_PACK=true, ZinTrust now expands JSON secret bindings listed inPACK_KEYSinto the resolvedEnv.get(...)view, keeps direct env values above packed values, tracks the winning source for diagnostics, and auto-loads local.env.packfiles for Node-side development without overriding the direct control keys. - Extended the Cloudflare shared-env manifest workflow so deploy commands now reuse the same target-aware secret selection as
zin put cloudflare, lettingzin deploy,zin deploy d1-proxy,zin deploy kv-proxy, andzin deploy:ccpsync selected Worker secrets automatically beforewrangler deployunless--no-sync-secretsis passed. - Updated microservice scaffolding so new services automatically register their canonical
domain/nameID under.zintrust.json -> cloudflare.targets, keeping service-specific Cloudflare secret selection aligned with the generated runtime manifest and service-local Worker config.
2026-04-06
- Updated
scripts/release/sync-package-versions.mjsso CI can opt into--bump-root-to-next, which advances the rootpackage.jsonversion to the next published patch line when needed and pins non-local@zintrust/*dependency specs to the live npm versions while preserving package-localfile:links. - Reworked the npm-based GitHub workflows to stop failing fast on
sync-package-versions.mjs --check. CI, smoke, SonarQube, and security jobs now self-heal by running the sync script plusnpm install --package-lock-only --ignore-scriptsbeforenpm ci, while the publish workflow refreshes workspace metadata without auto-bumping the publish line.
2026-03-30
- Added a first-class Cloudflare env-target manifest shape to fresh
.zintrust.jsonscaffolds viacloudflare.shared_env,cloudflare.targets, andcloudflare.wrangler_envs, then wired that manifest intozin putand localzin s --wgsnapshots. Fresh projects can now keep one canonical shared secret list plus additive per-target keys, and Wrangler dev no longer needs to dump every loaded env var into every Worker by default. - Fixed the
zin init:container-workersscaffold so the generateddocker-compose.workers.ymlkeepsWORKER_ENABLEDandWORKER_AUTO_STARTcorrectly indented inside theworkers-api.environmentlist. This prevents malformed compose output in freshly scaffolded worker container setups.
2026-03-29
Fixed the Cloudflare Containers proxy gateway so it now routes both the documented public service prefixes such as
/redis/*and the internal ZinTrust proxy paths such as/zin/redis/commandto the correct backend container. This prevents Worker startup and auth flows from failing withRedis proxy request failed (404)when a caller reaches the gateway using the raw proxy path.Fixed the
release -> masterRelease PR patch-bump flow soscripts/ci/bump-version.js --applyno longer callsnpm install --package-lock-onlyafter bumping to an unpublished workspace version.scripts/release/sync-package-versions.mjsnow keeps workspace package manifests and the matchingpackage-lock.jsonentries in exact lockstep with the core version, which prevents the CIETARGET No matching version found for @zintrust/core@^...failure during automated release PR bumps.Updated the active dependency-maintenance line on
devby bumping the root ranges for@cloudflare/containers,@faker-js/faker,@types/pg,eslint,miniflare,mongodb,mssql, andtypescript-eslint, syncing the Cloudflare Containers proxy workspace package to@cloudflare/containers@^0.2.0plus newer Workers types, and refreshing pinned GitHub Actions SHAs foractions/checkout,docker/login-action, TruffleHog, and CodeQL. The TypeScript6.0.2bump was intentionally left out becausetypescript-eslint@8.57.2still requirestypescript < 6.0.0in this repo.Fixed Docker release builds so they keep
DIST_SKIP_NPM_VERSION_CHECK=trueduring the builder stage. This prevents the dist package manifest and build banner from auto-advancing past the published release line during local and CI image builds.Extended the release version sync flow so it now updates and validates root
package.jsondependencies on workspace packages alongside the workspace manifests themselves. This keepspackage-lock.jsonaligned fornpm ciconsumers such as the Docker image build, preventing release lines like0.4.34from publishing packages successfully while the container build still resolves an older internal package range.Updated Queue Monitor middleware validation so
QUEUE_MONITOR_MIDDLEWAREnow accepts supported dynamic route middleware keys such asrateLimit:1000:1, then documented that env usage in the queue docs.Hardened the automated release bump flow so
scripts/ci/bump-version.js --applynow re-syncs workspace package versions and refreshes the root lockfile immediately after bumping core, and the release PR workflow now commits those workspace manifest updates too. This prevents the workspace version sync CI gate from failing on freshly bumped release branches.Re-synced all workspace package versions,
@zintrust/corepeer ranges, and the rootpackage-lock.jsonto0.4.33after publish so thenode scripts/release/sync-package-versions.mjs --checkCI gate stays green for the new release line.Documented the Queue Monitor env surface more clearly, including that
QUEUE_MONITOR_MIDDLEWAREis the env key for protecting the dashboard with registered route middleware keys such asauthorauth,jwt, and that invalid keys fail config loading.Expanded the middleware docs to show inline route rate-limit keys alongside the existing
RateLimiter.create()registration pattern, and added focused middleware key tests so malformedrateLimit:<max>:<windowInMinutes>strings are rejected while valid parameterized keys remain accepted.Added parameterized route middleware support for rate limiting, so routes can now declare inline keys such as
rateLimit:6:1orrateLimit:100:0.4and get a lazily createdRateLimiterinstance without pre-registering a separate middleware name.Synced all workspace package versions and
@zintrust/corepeer ranges to0.4.32, regenerated the root lockfile, and added a pre-npm ciworkspace-version check in every npm-based CI workflow so package/version drift fails fast with a direct error instead of anERESOLVEinstall failure.Updated the fresh project scaffold to generate
src/boot/bootstrap.tsas a thin@zintrust/core/bootwrapper, so new apps can reuse the stock ZinTrust Node/Docker bootstrap lifecycle without copying the full core bootstrap source.Published a stable
@zintrust/core/bootsubpath backed bysrc/boot.tsso fresh-app and Docker/bootstrap flows can import the side-effect boot entrypoint directly instead of relying on internal@boot/*aliases.Updated the Wrangler-backed
zin proxy:d1andzin proxy:kvcommands to accept--port <port>and forward it towrangler dev, so local Cloudflare proxy Workers can be started on an explicit port likezin proxy:d1 --port 8787.Bumped
@zintrust/coreto0.4.31for the proxy CLI consumer-app fix after correcting both the published scaffold output and the core proxy runtime exports.Updated the generated D1 and KV proxy Worker shims plus the developer docs to use the stable
@zintrust/core/proxyexport surface instead of nested proxy subpath imports, which fixes fresh consumer apps where Wrangler could not resolve@zintrust/core/proxy/d1/ZintrustD1Proxyor@zintrust/core/proxy/kv/ZintrustKvProxyduring local dev.Replaced the core
ZintrustD1ProxyandZintrustKvProxyexports with built-in Worker handlers instead of optional package loaders, which fixes fresh apps that previously failed at runtime withOptional dependency not installed: @zintrust/cloudflare-d1-proxyor the KV equivalent.Updated the
zin proxy:d1scaffold so the generatedenv.d1-proxyblock now includes a commented Wrangler custom-domain route example ford1-proxy.example.com, matching the existing proxy scaffold guidance style.Updated the
zin proxy:kvscaffold so the generatedenv.kv-proxyblock now includes a commented Wrangler custom-domain route example forkv-proxy.example.com, matching the existing proxy scaffold guidance style.
2026-03-28
- Fixed the package release flow for published adapters/packages so it now runs the same ESM relative-import repair and package artifact post-processing used by the normal package builder before publishing, which prevents broken extensionless imports such as the
@zintrust/queue-monitorDocker startup failure on fresh installs. - Updated
zin new --with-d1-proxyso it no longer scaffolds the stale standalone@zintrust/cloudflare-d1-proxydependency into fresh apps and instead points developers at the supported core entrypoint pluszin proxy:d1andzin deploy d1-proxyworkflow. - Added
zin proxy:d1for local D1 proxy development. The command now scaffoldsenv.d1-proxyintowrangler.jsoncwhen missing, then starts local Wrangler dev against the core D1 proxy entrypoint, and the docs now point developers to@zintrust/core/proxy/d1/ZintrustD1Proxy. - Added
zin proxy:kvfor local KV proxy development. The command now scaffoldsenv.kv-proxyintowrangler.jsoncwhen missing, then starts local Wrangler dev against the core KV proxy entrypoint, and the docs now point developers to@zintrust/core/proxy/kv/ZintrustKvProxy. - Updated the Cloudflare proxy docs so the D1, KV, and Containers package pages plus the D1/KV remote guides now show the supported ZinTrust deploy CLI and local dev CLI commands directly after installation/setup, and corrected the D1/KV package pages to reflect that those Worker packages are currently deployed from the repo rather than installed as public npm packages.
- Updated the container worker scaffold again so
docker-compose.workers.ymlnow boots a single bootstrap-drivenworkers-apiservice that serves the worker pages and auto-starts eligible workers in the same process, replacing the previous splitworkers-apiplusworker-runnerdefault. - Updated
@zintrust/workersso worker discovery can fall back to project worker files when persistence is empty, which lets fresh projects surface worker metadata and details without first creating worker rows in the database. - Added an explicit
workerDefinitionstarter worker template for fresh apps, extended worker auto-start to use file-backed definitions only when persisted auto-start candidates are absent, and documented directzin migrate:worker --connection <name>usage for D1-backed worker persistence. - Added an optional
src/zintrust.workers.tsproject worker bootstrap file for fresh apps, and updated Docker/worker startup so the worker image andworker:start-allcan auto-load that entrypoint while also falling back to file-backed worker definitions when persisted worker rows are absent. - Updated the container worker scaffold to generate a dedicated
Dockerfile.workersoverlay image that builds fresh projects withnpm run build, then layers compiled worker artifacts onto the publishedzintrust/zintrustbase image so developers can use eitherapp/Workersdiscovery or an optionalsrc/zintrust.workers.tsentrypoint.
2026-03-27
- Updated the container worker scaffold so generated database password env vars no longer ship with an insecure hard-coded
secretfallback, which removes the Sonar new-code security finding on the release PR while keeping password values configurable through project env files. - Updated the basic app scaffold to include the published
@zintrust/d1-migratorpackage by default so fresh projects keep thezin migrate-to-d1command available without a separate manual install, and clarified the CLI reference to match the optional-package auto-registration flow.
2026-03-26
- Verified the Cloudflare Workers auth and jwt failure path keeps the default
401contract by default and honors project responder overrides for custom status/body output, then added a focused regression test covering both cases. - Updated the auth-response verification note and middleware failure override docs so they reflect the current
@zintrust/core@0.4.22API surface and the supported responder-based customization path.
2026-03-23
- Added Microservices Runtime Guide to document the generated manifest, runtime hook files, canonical service IDs, standalone service boot, and layered config overrides.
- Clarified that generated services use
routes/api.tsandsrc/bootstrap/service-manifest.tsas the main runtime entry files developers work with. - Documented the current implementation status: manifest-based route mounting is in place, standalone Node config layering has started, and Worker-specific service-local config integration is still being extended.
- Documented that scaffolded microservices now generate their own
wrangler.jsonc, with service-owned aliases kept local and root-owned aliases mapped back to the root project. - Clarified terminology in the developer docs so Cloudflare Worker runtime, generic serverless runtime, and ZinTrust background workers are described explicitly instead of all being shortened to “worker”.
- Extended that terminology cleanup into broader developer docs including cloud deployment, architecture, worker management, and helpers so Cloudflare Worker runtime and ZinTrust background workers are not conflated.
- Updated the runtime guide to state explicitly that standalone microservice boot code lives in the microservice
src/index.ts, replaced internal-sounding headings likeCurrent behaviorandCurrent Limits, and rewrote the remaining runtime work section in developer-facing terms. - Implemented scaffolded Cloudflare Worker / serverless service-local startup config merging so generated microservice
wrangler.jsoncfiles keep root config aliases pointing at the root app while also exposing optional service-local config aliases for layered overrides. - Moved scaffolded standalone microservice boot ownership into a first-class core start helper so generated service entrypoints delegate runtime setup to framework code instead of hand-wiring
ProjectRuntime.set(...)themselves. - Updated generated runtime hook and service manifest files so the built CLI can import source-owned runtime metadata in consumer apps without failing on extensionless local imports, which fixes manifest-backed
zin routesloading and standalone service boot in freshly scaffolded projects. - Refreshed the maintainer-facing scaffold runtime fix process note so it documents the implemented core behavior, the dist-package consumer validation, and the remaining need for legacy generated-file normalization.
- Updated CLI service-directory startup env loading so root
.env*files load first and service-local.env*files override them, and added clearer developer guidance for the missingtsxruntime dependency during standalone microservice starts. - Added monolith-only manifest route prefixes for microservices so standalone services keep their native paths while monolith mounting defaults each service to
/<domain>/<name>unless the manifest overrides the prefix. - Updated official runtime plugin auto-imports so missing optional ZinTrust adapter packages no longer raise a startup warning in consumer apps, while genuinely broken installed plugin register modules still surface as failures.
- Added explicit standalone microservice env controls so
bootStandaloneService()andzin scan keep root env loading enabled by default, skip it withrootEnv: falseor--no-root-env, and override the inferred microservice env source withenvPathor--env-path. - Upgraded
simulate/fresh-checkinto a generated-style standalone microservice fixture withsrc/bootstrap/service-manifest.ts,src/zintrust.runtime*.ts, and a focused simulation test that verifies root.envloading plus service-local.envoverrides from a service-directory context. - Fixed three runtime regressions in the startup path: root monolith starts now preload service-local
.envfiles with service values overriding root duplicates, service-directoryzin snow boots the standalone service instead of short-circuiting on partially cached runtime metadata, and Worker startup now avoids eager non-default database instantiation that previously triggered Cloudflare PostgreSQL socket failures during boot. - Fixed the remaining standalone Worker env propagation gap so
zin s --wgfrom a microservice directory now injects the merged root-plus-service env set into Wrangler dev bindings, allowing Worker routes to see root values and service overrides consistently in bothEnv.get(...)and staticEnv.*reads. - Added a per-service
loadEnvmanifest flag so monolith startup can mount a microservice while explicitly skipping that service's local.env*preload layer. - Updated service scaffolding guidance and generated manifest entries to default mounted services to
loadEnv: false, avoiding monolith root/global env merging unless developers opt in explicitly. - Updated startup so official runtime plugin auto-import failure warnings are only emitted in Docker worker mode, which prevents noisy
zin sand freshly scaffolded project flows from showingLoaded 0/16 official plugin importsduring normal local development. - Added
d1as a first-classzin newdatabase option alongsided1-proxy, so the interactive database list now includes direct Cloudflare D1 as well as the HTTPS proxy mode. - Updated
zin newproject scaffolding so generated.gitignorefiles include.dev*, which keeps temporary Wrangler-style dev variable files out of git by default. - Fixed manifest-backed microservice route loading in
zin s --wgfor generated apps by generatingsrc/zintrust.plugins.wg.tswith the requiredProjectRuntime.set({ serviceManifest })seed automatically, so developers no longer need to add that block by hand in fresh projects. - Fixed
zin s --wgstartup in fresh projects when the optional@zintrust/workerspackage is not installed, so Cloudflare/WranglerNo such module "@zintrust/workers"failures now fall back to the disabled worker runtime instead of aborting app boot. - Corrected the
newstartWorker entry example so it re-exports the core Cloudflare handler instead of callinggetKernel()before Worker bindings are initialized; middleware in fresh apps should stay registered throughconfig/middleware.tsand route metadata rather than custom Worker bootstrap wrappers. - Updated
zin s --wgto forceWORKER_ENABLED=false, which prevents background worker package initialization in Wrangler dev even if a custom Worker entrypoint is written incorrectly, and added a start-time warning whensrc/index.tscallsgetKernel()before the core Cloudflare handler. - Added project-level custom middleware registration support through
config/middleware.ts, updated the middleware docs with the full fresh-app flow, and madezin add middleware <Name>generate and register a route middleware skeleton automatically. - Fixed standalone
zin s --wgfromsrc/services/<domain>/<name>so it now prefers service-local port env vars like<SERVICE_NAME>_PORTand no longer falls back to a conflicting rootAPP_PORT; newly scaffolded services now also writeAPP_PORT,PORT, andSERVICE_PORTinto their local.envfiles.
2026-03-25
- Merged the typed middleware registry guide into
docs/middleware.mdso middleware usage, project registration, typed route keys, and governance test guidance now live in one canonical page, and updated the docs site navigation to point at that single doc. - Updated JSON request error handling so
NotFoundErrorstacks are still logged server-side but no longer returned in API error payloads. - Blocked accidental root-package
npm publishso releases fail fast unless they publish the compileddistpackage, which fixes the broken global CLI install path where source bin entries tried to resolve aliases like@config/loggerat runtime. - Updated
zin dockerto reuse one deterministic.dev.vars*.disabled-by-zinbackup per file and remove legacy UUID-suffixed backups automatically, so repeated Docker/Wrangler dev runs no longer keep accumulating stale backup files. - Updated request-body XSS sanitization to strip markup without HTML-encoding opaque JSON payload characters like
/and=, which preserves base64 and signed token inputs in fresh apps while keeping output escaping in the HTML render layer. - Documented and scaffolded the plug-and-play built-in middleware override path for fresh apps, including overriding keys like
jwtinconfig/middleware.tsso developers can customize default auth error payloads without changing route metadata. - Updated core middleware assembly so built-in keyed overrides now apply consistently to both route resolution and the shared global middleware slots, making fresh-app plug-and-play overrides factual for framework-owned middleware keys instead of only route-local keys.
- Added a first-class middleware responder contract for response-writing built-ins so fresh apps can customize default auth, CSRF, rate-limit, validation, and JSON error payloads through
config/middleware.tswithout replacing the underlying middleware logic. - Refreshed vulnerable transitive dependencies so the workspace now resolves
picomatchto patched2.3.2and4.0.4releases andyamlto2.8.3, clearing the reported npm audit advisories without changing the top-level dependency API. - Fixed two Workers DX regressions that previously forced repository-level core patching in fresh apps:
SecurityMiddleware.create()now derives default CORS behavior fromsecurityConfig.corsinstead of hard-coded values, and the Cloudflare response bridge now preserves middleware-set HTTP status codes when the framework response wrapper writes tores.statusCode. - Fixed the Worker startup-config loader so fresh-app overrides from
config/middleware.tsare bundled and applied in livezin s --wgruns, which restores app-owned auth/jwt responder customization, and addedOPTIONSpath fallback routing so global security middleware can answer CORS preflights even when a route only exists under other HTTP methods. - Updated core auth/jwt built-in unauthorized fallback bodies to ship a structured
{ error: { code, message } }contract by default, and fixed@zintrust/queue-redispackage builds to normalize dist ESM imports before publish so clean installs no longer depend on downstream rewrite scripts. - Split the default middleware failure body helper into a dedicated middleware body module so editor/type-service resolution stays stable when auth and jwt middleware import the structured fallback body factory.
- Updated
@zintrust/queue-redisto publish against a semver peer on@zintrust/corewhile keeping a localfile:../../distdev dependency, so package-local work still uses the local core build but clean tarball installs resolve like published consumers.