4.0 KiB
Contributing to Langship
Thanks for your interest. This guide covers the dev setup, what to run before opening a PR, and the conventions we follow.
By contributing, you agree your contributions are licensed under the Apache License 2.0 (the project's license). No CLA or DCO sign-off is required.
Code of conduct
Participation is governed by CODE_OF_CONDUCT.md. Report concerns to khush@lyzr.ai.
Repo layout
| Path | What |
|---|---|
cmd/flow/ |
the flow server binary (API + Restate worker entry point) |
pkg/api/ |
REST + SSE handlers |
pkg/orchestrator/, pkg/engine/ |
DAG walk, execution context, events |
pkg/executors/ |
node implementations (Build, Push, SAST, Approval, Promote, Deploy, …) |
pkg/awsdeploy/ |
AWS Bedrock AgentCore adapter (STS, ECR, IAM, control-plane SigV4) |
pkg/storage/ |
Mongo-backed stores (pipelines, runs, agents, credentials, environments) |
pkg/secrets/ |
AES-GCM seal/open keyed off FLOW_SECRET_KEY |
web/ |
Next.js UI (static export) |
langship-cli/ |
the langship Python CLI |
Dev environment
Backing services (Mongo, Restate, BuildKit, MinIO, registry) come up via docker-compose; the Go API runs on the host. See the Quickstart and Dev (hot reload) sections in the README for the exact commands. In short:
make services # docker-compose: mongo, restate, buildkitd, registry, minio
make watch # Go API with air (rebuilds on .go change) — or `make serve` for a stable binary
cd web && pnpm dev # Next dev server, /api proxies to :8090
Set FLOW_SECRET_KEY in your environment before working on anything that
touches credentials/environments — the API refuses credential writes
without it.
CLI:
pip install -e ./langship-cli
langship login --api-url http://localhost:8090
Before you open a PR
- Go:
go build ./...andgo test ./...must pass. Rungofmt/go veton changed files. - Web:
cd web && pnpm tsc --noEmitmust pass (andpnpm buildif you changed anything that affects the static export). - CLI:
pip install -e ./langship-cli && langship --helpshould work; smoke-test any command you touched against a local server. - Keep changes focused — one logical change per PR.
- Update the README / CLI README /
aude.mdif you changed behavior they describe.
Conventions
- Commits: imperative subject, ≤ ~72 chars (
feat:/fix:/refactor:prefixes are welcome but not required). Squash noise before pushing. - Branches:
mainis the trunk; branch off it. Don't push directly tomain— open a PR. - Code style: match the surrounding code. Comments explain why, not
what. Executors emit
__<node>summary objects on output items; follow that pattern. - Errors: wrap with context (
fmt.Errorf("deploy: %w", err)); the API layer mapsstorage.ErrNotFound→ 404 andstorage.ErrAlreadyExists→ 409. - No secrets in code or commits. Anything sensitive goes through
pkg/secretsand is never returned by the API.
Adding a node executor
- Implement
executors.NodeExecutorinpkg/executors/<name>.go. Read the trigger payload viafirstItem(inputs)foragentId/environment/fromBranch. Emit each input item with a__<name>summary attached. - Register it in
pkg/executors/registry.go(pass any stores it needs viaRegistryDeps). - Add a catalog entry in
web/lib/node-catalog.tsand a<Name>Forminweb/components/canvas/node-form.tsx. - If it pauses (like Approval), special-case it in
pkg/orchestrator/walk.goso it isn't wrapped inrestate.Run(it calls Restate context methods directly).
Reporting bugs
Open a GitHub issue with: what you did, what you expected, what happened,
and the relevant logs (flow server output + the run's node logs from
langship runs logs <id> or /api/executions/{id}/logs/{node}).
Security
Vulnerabilities go to khush@lyzr.ai privately — see SECURITY.md. Do not open a public issue.