Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/gittensory-engine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

## engine-v0.1.0 - 2026-07-01

### Features
- Scaffold the shared deterministic engine package skeleton (#2275)
661 changes: 661 additions & 0 deletions packages/gittensory-engine/LICENSE

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions packages/gittensory-engine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# @jsonbored/gittensory-engine

Shared, deterministic engine logic for the Gittensory review stack and the `gittensory-miner`.

This package houses pure, side-effect-free logic (scoring preview/model, predicted-gate types, reward-risk,
slop signals, focus-manifest parse/compile core, duplicate-winner adjudication, and their engine-parity
fixtures) so the exact same code runs identically in the hosted review backend and in a local miner. It is
versioned independently of the app and published to npm as `@jsonbored/gittensory-engine`.

The logic is extracted from the app's `src/` in follow-up issues; this skeleton keeps the package buildable in
the meantime. The root `package.json` already globs `packages/*` in its `workspaces` field, so `npm ci`
discovers this package with no additional wiring.

## Build

```
npm run build --workspace @jsonbored/gittensory-engine
```

This runs `tsc -p tsconfig.json`, emitting `dist/` (the only published output alongside `CHANGELOG.md`).
45 changes: 45 additions & 0 deletions packages/gittensory-engine/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@jsonbored/gittensory-engine",
"version": "0.1.0",
"license": "AGPL-3.0-only",
"type": "module",
"description": "Shared deterministic engine logic for the Gittensory review stack and gittensory-miner.",
"repository": {
"type": "git",
"url": "git+https://github.com/JSONbored/gittensory.git",
"directory": "packages/gittensory-engine"
},
"homepage": "https://github.com/JSONbored/gittensory#readme",
"bugs": {
"url": "https://github.com/JSONbored/gittensory/issues"
},
"keywords": [
"gittensor",
"gittensory",
"engine",
"deterministic",
"scoring",
"signals"
],
"publishConfig": {
"access": "public"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": [
"dist",
"CHANGELOG.md"
],
"scripts": {
"build": "tsc -p tsconfig.json"
},
"engines": {
"node": ">=22.0.0"
}
}
8 changes: 8 additions & 0 deletions packages/gittensory-engine/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Barrel export for @jsonbored/gittensory-engine.
//
// This package will house the deterministic, side-effect-free logic shared by the Gittensory review-stack
// backend and the gittensory-miner (scoring preview/model, predicted-gate types, reward-risk, slop signals,
// focus-manifest parse/compile core, duplicate-winner adjudication, and their engine-parity fixtures).
// Extraction lands in follow-up issues; until the first module moves here, this barrel is intentionally empty
// so the package builds cleanly on its own.
export {};
13 changes: 13 additions & 0 deletions packages/gittensory-engine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": [],
"declaration": true,
"rootDir": "src",
"outDir": "dist",
"noEmit": false
},
"include": ["src"]
}
35 changes: 35 additions & 0 deletions test/unit/gittensory-engine-scaffold.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { describe, expect, it } from "vitest";
import enginePkg from "../../packages/gittensory-engine/package.json";

// The gittensory-engine package is a packaging-only scaffold (no runtime logic yet — the barrel export is
// intentionally empty until later issues extract deterministic modules into it). These tests pin the published
// package contract so the skeleton stays correct and installable as extraction lands.
describe("gittensory-engine package scaffold", () => {
it("declares the published package identity", () => {
expect(enginePkg.name).toBe("@jsonbored/gittensory-engine");
expect(enginePkg.version).toBe("0.1.0");
expect(enginePkg.type).toBe("module");
expect(enginePkg.license).toBe("AGPL-3.0-only");
expect(enginePkg.publishConfig?.access).toBe("public");
expect(enginePkg.engines?.node).toBe(">=22.0.0");
});

it("points its entry points at the built dist output", () => {
expect(enginePkg.main).toBe("dist/index.js");
expect(enginePkg.types).toBe("dist/index.d.ts");
expect(enginePkg.exports["."]).toEqual({
types: "./dist/index.d.ts",
default: "./dist/index.js",
});
});

it("publishes only the build output and changelog, not source", () => {
expect(enginePkg.files).toEqual(["dist", "CHANGELOG.md"]);
expect(enginePkg.files).not.toContain("src");
});

it("builds with a real tsc compile and records its repository directory", () => {
expect(enginePkg.scripts?.build).toBe("tsc -p tsconfig.json");
expect(enginePkg.repository?.directory).toBe("packages/gittensory-engine");
});
});
Loading