Skip to content

chore[notask]: migrate classification wrapper to TypeScript#3192

Open
yuranich wants to merge 4 commits into
tetherto:mainfrom
yuranich:poc/classification-ggml-typescript
Open

chore[notask]: migrate classification wrapper to TypeScript#3192
yuranich wants to merge 4 commits into
tetherto:mainfrom
yuranich:poc/classification-ggml-typescript

Conversation

@yuranich

@yuranich yuranich commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

@qvac/classification-ggml keeps its runtime wrapper and TypeScript declarations as separate hand-maintained files, which can drift as the addon API changes. This PoC validates a full addon migration path where sources are authored in TypeScript while the package still publishes JavaScript entrypoints for SDK and Bare consumers.

How does it solve it?

Adds TypeScript-authored wrapper sources, generated root JavaScript and declarations, package scripts that typecheck and assert generated output freshness, SDK-aligned TypeScript ESLint rules for addon source, publish jobs that rebuild the wrapper before publishing, and a small Bare example using the existing classification test image.

Validation run locally: npm run lint, npm run test:types, npm run test:dts, npm run test:unit, npm pack --dry-run, and git diff --check -- packages/classification-ggml .github/workflows/on-merge-classification-ggml.yml. npm run test:integration was attempted locally but is blocked by missing native prebuilds (ADDON_NOT_FOUND from binding.js). The new Bare example was later run successfully against local prebuilds and returned food as the top classification for meal_1.jpg.

Breaking changes

None expected. Runtime package entrypoints remain JavaScript.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

yuranich and others added 2 commits July 10, 2026 16:42
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@yuranich yuranich marked this pull request as ready for review July 10, 2026 13:35
@yuranich yuranich requested review from a team as code owners July 10, 2026 13:35
Co-authored-by: Cursor <cursoragent@cursor.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't add this file under "files" in package.json?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can but not really needed as it is not part of public API

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants