refactor: extract runtime Core into scripts/core.ts; runtime.mjs becomes a thin shell

Core exposes buildIndex/searchText/executeQuery/executeAttune as the single shared
implementation for all transports. First TypeScript module, run via Node type
stripping in dev. Adds typescript-eslint. lint/typecheck green, test 107/107.
This commit is contained in:
tommy0103
2026-07-08 16:59:30 +08:00
parent 33ec238c0c
commit 3391bf6ac3
6 changed files with 423 additions and 51 deletions
+15 -5
View File
@@ -1,12 +1,12 @@
// Flat ESLint config for the Obelisk root (Core + skill runtime + tests).
// Scope: the ESM sources under scripts/ and tests/. The Electron app has its own
// package and toolchain and is intentionally excluded (see docs/adr/0003).
// typescript-eslint is deferred to Phase 4, when the first .ts files land.
// Scope: the ESM/TS sources under scripts/ and tests/. The Electron app has its
// own package and toolchain and is intentionally excluded (see docs/adr/0003).
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
export default tseslint.config(
{
ignores: [
'node_modules/**',
@@ -32,4 +32,14 @@ export default [
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
];
{
files: ['**/*.ts'],
extends: [...tseslint.configs.recommended],
languageOptions: {
globals: { ...globals.node },
},
rules: {
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
);