`npm run build:skill` emits dist/obelisk-skill/: the whole scripts/ Core
compiled to readable JS (module structure + comments preserved, ~1:1 with
source, no bundling/minifying per ADR-0004), plus schema.sql, SKILL.md,
references/, and a package.json. It excludes app/, tests/, and release/, which
is what keeps the artifact small.
- tsconfig.skill.json compiles scripts/**/*.{ts,mjs} (allowJs) with
rewriteRelativeImportExtensions, so the .ts specifiers inside the .mjs shells
(runtime.mjs -> ./core.js, indexer.mjs -> ./providers/*.js, ./persist.js) are
rewritten to .js. declaration:false — the skill needs no .d.ts.
- packaging/skill-package.json provides the artifact's package.json; it sets
"type":"module" because the emitted .ts->.js files are ESM.
- build:skill runs tsc then copies schema.sql/SKILL.md/references/package.json.
Add tests/build-skill.test.mjs: runs the real build:skill, asserts the artifact
structure, that no emitted .js/.mjs still imports a .ts module, and that the
compiled artifact builds an index and answers a search end-to-end under plain
Node (no type-stripping) against a temp HOME.
Verified: suite 123/123, typecheck clean, artifact smoke run green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
1.0 KiB
JSON
24 lines
1.0 KiB
JSON
{
|
|
"name": "obelisk",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Explicit memory infrastructure for coding agents — a queryable SQLite evidence layer over local Claude Code and Codex history, plus human-approved durable memory.",
|
|
"license": "AGPL-3.0",
|
|
"scripts": {
|
|
"test": "node --experimental-test-module-mocks --test tests/*.test.mjs",
|
|
"typecheck": "tsc --noEmit && tsc --noEmit -p app/tsconfig.json",
|
|
"lint": "eslint .",
|
|
"build:core": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
"build:skill": "rm -rf dist/obelisk-skill && tsc -p tsconfig.skill.json && cp scripts/schema.sql dist/obelisk-skill/scripts/ && cp SKILL.md dist/obelisk-skill/ && cp -R references dist/obelisk-skill/references && cp packaging/skill-package.json dist/obelisk-skill/package.json"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^26.1.1",
|
|
"eslint": "^10.6.0",
|
|
"globals": "^17.7.0",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.63.0"
|
|
}
|
|
}
|