Skip to content

feat(module): add integration module authoring SDK#4

Draft
jeroenrinzema wants to merge 1 commit into
mainfrom
feat/module-sdk
Draft

feat(module): add integration module authoring SDK#4
jeroenrinzema wants to merge 1 commit into
mainfrom
feat/module-sdk

Conversation

@jeroenrinzema

Copy link
Copy Markdown
Contributor

Summary

Moves the Lunogram integration module authoring contract (ABI) into the Go SDK so first- and third-party modules can build against a small, versioned package instead of replace-ing the entire lunogram/platform monorepo.

This is the first step toward extracting modules/ out of the platform repo and distributing them as signed, versioned OCI artifacts. Decoupling the ABI is the prerequisite — everything else (modules repo, OCI publish, runtime dynamic loading) depends on it.

What's here

A faithful 1:1 relocation of the platform's pkg/modules tree. Only package names, import paths, and the module.* qualifier changed — no semantic edits.

Package Import path Was
module github.com/lunogram/go-sdk/module pkg/modules
provider github.com/lunogram/go-sdk/module/provider pkg/modules/providers
action github.com/lunogram/go-sdk/module/action pkg/modules/actions

Design notes:

  • Kept out of the root package lunogram (the API client) — the module ABI is a distinct surface and would collide on names like Channel/Metadata/RateLimit.
  • Singular package names (module, provider, action) per Go convention; capabilities nested under module/ since they're capabilities of a module.
  • Only new dependency is github.com/google/uuid (used by provider rate-limit keys). Surface stays stdlib-only otherwise, so it compiles cleanly to WASM with TinyGo.

Verification

  • go build ./...
  • go test ./module/... ✅ (relocated manifest tests pass)
  • golangci-lint run ✅ clean
  • gofmt clean

Follow-ups (not in this PR)

  1. Platform repoint — separate PR on lunogram/platform: swap …/platform/pkg/modules imports to …/go-sdk/module, delete pkg/modules, repoint each module's go.mod to a tagged go-sdk release.
  2. Tag a release of go-sdk so platform + modules can require it.
  3. Dedup smellChannel/Platform/RateLimit are duplicated between module and provider. Carried over verbatim here; worth consolidating later.

Move the Lunogram integration module ABI into the Go SDK so first- and
third-party modules can build against a versioned contract without
depending on the platform monorepo.

New packages:
  - module          — manifest, metadata, config JSON Schema, lifecycle
  - module/provider — delivery-provider capability (channels, payloads,
                      webhooks, rate limits)
  - module/action   — callable action capability

Faithful 1:1 relocation of the platform's pkg/modules tree: only package
names, import paths, and the module.* qualifier changed. The surface
depends solely on the standard library and google/uuid so it stays
TinyGo/WASM-friendly.
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.

1 participant