Skip to content

Datascripts: pin Bun and generate Package schema typings #314

Closed

Description

@Mathih13

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Establish the reproducible Bun and schema-type toolchain for Package authors.

Current behavior:
The repository has no Bun project, Package Datascript runner, generated TypeScript schema, or TypeScript compatibility check.

Desired behavior:
Pin one Bun version and commit bun.lock. Package-author commands verify that exact compatible toolchain through doctor. Generate TypeScript types from the current Module schema, including installed Package tables, into a stable author-facing location. Run tsc --noEmit as the typecheck gate. Operators applying generated Package Deltas do not need Bun.

Datascripts are trusted author-time code. Run them from a documented Package working directory. Do not describe the runner as a security sandbox.

Key interfaces:

  • Pinned Bun version and lockfile
  • Package build and doctor commands
  • Generated schema typings
  • TypeScript typecheck command

Acceptance criteria:

  • A fresh author checkout installs the locked dependencies with the pinned Bun version.
  • Doctor reports missing or incompatible Bun with the exact remediation.
  • Type generation reflects core and installed Package tables.
  • Renaming a schema field makes code using the old name fail tsc --noEmit.
  • An Operator can apply a prebuilt Package without Bun or Node tooling.

Out of scope:

  • The spell authoring API
  • Executing Runtime Scripts
  • Sandboxing trusted author-time code

Activity

  1. added
    enhancementNew feature or request
    P2normal
    ready-for-agentComplete enough to build from the issue alone, by a person or their agent
    on Aug 24, 2026
  2. Mathih13 commented on Aug 26, 2026

    @Mathih13
    ContributorAuthor

    This was generated by AI during triage.

    Partially shipped. lyracore-cli #34/#35 landed the spine, and .lyracore-cli-rev already pins a descendant of the #35 merge:

    • lyracore packages build: spacetime generate --lang typescript --no-config into datascripts/generated/, then bun install --frozen-lockfile, then the locked project-local tsc --noEmit under Bun, with a prerequisite check for package.json/bun.lock/tsconfig.json.
    • doctor: exact Bun 1.3.7 pin with version-specific remediation; warn-only, so Operators never need Bun.
    • datascripts/bun.lock + package.json (engines.bun 1.3.7) + tsconfig.json are committed in this repo.

    What remains in scope here:

    1. packages build trusts whatever bun is on PATH; only warn-only doctor checks the pin. The build itself should fail on a missing or mismatched Bun with the same remediation.
    2. Criterion 3 (typings cover installed Package tables) holds by construction (module/build.rs compiles enabled Package tables into the wasm the typegen reads) but no Datascript exercises a Package-defined table type. The reference Datascript should import one to prove it.

    Routed elsewhere, not gaps in this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2normalenhancementNew feature or requestready-for-agentComplete enough to build from the issue alone, by a person or their agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions