Skip to content

StateCore v1.6.1

Latest

Choose a tag to compare

@yul761 yul761 released this 14 Aug 18:27
· 68 commits to main since this release

A packaging fix. No change to the /v1 contractinfo.version stays 1.5.0.

What was wrong

All four library packages pointed main at src/index.ts, which Node cannot execute. The Docker image worked only because a stage in the Dockerfile rewrote those four package.json files to dist before the runtime started — which made the image the one place a built app could be started. Every other consumer of the same build got:

packages/db/src/index.ts:1
import type { PrismaClient } from "@prisma/client";
SyntaxError: Unexpected token '{'

That is what the integration smoke workflow had been dying on, behind a separate pgvector failure that hid it.

What changed

main is now dist/index.js and the rewrite stage is gone. types still points at source: TypeScript resolves it through the node_modules symlink, which is exempt from the importing package's rootDir check — mapping these names through paths instead fails every build with TS6059.

Source-mode consumers keep working without building first. Vitest reads main, so vitest.shared.ts aliases the four names back to source, and the three packages that had no Vitest config now have one. tsx reads main too, so pnpm dev:* and two scripts pass --tsconfig tsconfig.dev.json.

If you resolve these packages by main, you now get built JavaScript and must build first.

Verified

With every dist removed: lint clean, and core (478), api (121), worker (39) and prompts (2) pass. Built: node apps/api/dist/main.js serves health 200, scripts/ci/integration-no-llm.sh runs the API and worker with smoke:no-llm passing end to end, and the api-runtime image builds and starts with no rewrite stage.

Integration Smoke is green for the first time since June, and now runs on push to main rather than only on pull requests — which this repository does not use, and which is why it sat red unnoticed for two months.

Full detail: CHANGELOG.md