Skip to content

feat(sdk-ts): TypeScript plugin SDK via Javy + esbuild→wasm build pipeline - #463

Merged
tayebmokni merged 1 commit into
mainfrom
feat/plugin-sdk-ts
May 26, 2026
Merged

feat(sdk-ts): TypeScript plugin SDK via Javy + esbuild→wasm build pipeline#463
tayebmokni merged 1 commit into
mainfrom
feat/plugin-sdk-ts

Conversation

@tayebmokni

Copy link
Copy Markdown
Contributor

Closes #242.

packages/ts/sdk-plugin: TypeScript SDK for GoNext plugin authors via Javy (JS→WASM).

  • pluginInit + registerAction/registerFilter, async-aware dispatcher
  • Typed wrappers over gn_* host ABIs via globalThis (host.kv, host.db, host.http, host.audit, host.observe, host.log, etc.)
  • Manifest builder + validator mirroring gonext.io/v1
  • JSON codec helpers mirroring packages/go/plugins/abi/hooks/marshal.go
  • gonext-sdk-build CLI wrapping esbuild + Javy + manifest gate
  • cli/gonext templates/typescript + gonext plugin init --template=typescript
  • examples/plugins/sdk-ts-hello — worked plugin demonstrating action + filter + kv.set + audit.emit
  • 54 Vitest unit tests (codec, manifest, dispatcher) + 7 Go tests for the init command

Test plan

  • pnpm --filter @gonext/sdk-plugin test — 54 tests passing
  • pnpm --filter @gonext/sdk-plugin typecheck
  • go test ./cmd/plugin/... in cli/gonext — all init tests passing
  • pnpm typecheck in examples/plugins/sdk-ts-hello
  • gonext-sdk-build --skip-wasm against the example produces a valid dist/plugin.js + dist/manifest.json
  • Full Javy compile (skipped in CI; verified locally when Javy is on PATH)

🤖 Generated with Claude Code

@tayebmokni
tayebmokni enabled auto-merge (squash) May 25, 2026 20:18
@github-actions

Copy link
Copy Markdown

Heads up — this PR touches strings that often signal a security disclosure (vulnerab, CVE-, exploit, bypass, or auth bypass).

If this PR fixes or describes a real vulnerability that has not yet been publicly disclosed, please stop and use the private path:

  1. Open a private security advisory, or
  2. Email security@gonext.io with subject [SECURITY] GoNext - <summary>.

See /SECURITY.md for the full disclosure flow and /docs/16-bug-bounty.md for bounty terms.

If this is a false positive (test fixture, doc update, release notes, etc.) please ignore this comment — the check is advisory only and does not block the PR.

Matched files:

  • packages/ts/sdk-plugin/README.md

@tayebmokni
tayebmokni force-pushed the feat/plugin-sdk-ts branch 2 times, most recently from 57cc0d7 to 3de6500 Compare May 25, 2026 21:03
Closes #242.

packages/ts/sdk-plugin: TypeScript SDK for GoNext plugin authors via
Javy (JavaScript → WASM).

- pluginInit + registerAction / registerFilter
- Typed wrappers over every gn_* host ABI through globalThis
- JSON envelope codec
- Manifest builder mirroring the Go side
- bin/gonext-sdk-build.js wraps esbuild + javy compile
- cli/gonext/templates/typescript + 'gonext plugin init --template=typescript'
- examples/plugins/sdk-ts-hello working example
- 54 Vitest tests (codec + manifest + dispatch)

This PR was rebased onto main after #460/#461/#462 landed; the
runInit dispatch now switches on template name and embeds both
templates/go and templates/typescript via the single templatesFS.

Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
@tayebmokni
tayebmokni force-pushed the feat/plugin-sdk-ts branch from 3de6500 to 3203503 Compare May 26, 2026 17:31
@tayebmokni
tayebmokni merged commit 03c010d into main May 26, 2026
17 of 25 checks passed
@tayebmokni
tayebmokni deleted the feat/plugin-sdk-ts branch May 26, 2026 21:39
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.

Plugin SDK (TypeScript via Javy): npm package + tsc→javy build pipeline

2 participants