feat(module): add integration module authoring SDK#4
Draft
jeroenrinzema wants to merge 1 commit into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 entirelunogram/platformmonorepo.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/modulestree. Only package names, import paths, and themodule.*qualifier changed — no semantic edits.modulegithub.com/lunogram/go-sdk/modulepkg/modulesprovidergithub.com/lunogram/go-sdk/module/providerpkg/modules/providersactiongithub.com/lunogram/go-sdk/module/actionpkg/modules/actionsDesign notes:
package lunogram(the API client) — the module ABI is a distinct surface and would collide on names likeChannel/Metadata/RateLimit.module,provider,action) per Go convention; capabilities nested undermodule/since they're capabilities of a module.github.com/google/uuid(used byproviderrate-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✅ cleangofmtcleanFollow-ups (not in this PR)
lunogram/platform: swap…/platform/pkg/modulesimports to…/go-sdk/module, deletepkg/modules, repoint each module'sgo.modto a taggedgo-sdkrelease.go-sdkso platform + modules can require it.Channel/Platform/RateLimitare duplicated betweenmoduleandprovider. Carried over verbatim here; worth consolidating later.