feat(op): Op composite + Temporal workflow code generation#14
Merged
Conversation
Closes #7. - `packages/core/src/op/` — Op(), phase(), activity(), gate() builders plus pre-built shortcuts (build, kubectlApply, helmInstall, waitForStack, gitlabPipeline, stateSnapshot, shell, teardown); Op is a Temporal::Op Declarable so existing discovery picks up *.op.ts files automatically - `lexicons/temporal/src/op/activities/` — 8 real TypeScript activity implementations with heartbeating (helm, kubectl, wait, gitlab) - `lexicons/temporal/src/op/serializer.ts` — generates workflow.ts, activities.ts, worker.ts under dist/ops/<name>/ for each Op entity; groups proxyActivities calls by profile, handles parallel phases via Promise.all, emits defineSignal + condition for gate steps - Wire serializeOps into the temporal serializer; add ./op/activities export to temporal package.json; re-export Op builders from temporal index - Add ./op export to core package.json - 27 new core tests + 24 Op serializer tests + 8 new serializer.test.ts cases; full suite: 5514 tests, 468 files, all passing - Example: examples/gitlab-aws-alb-op/ops/alb-deploy.op.ts
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
Op()declarable builder inpackages/core/src/op/— a named, phased Temporal workflow declared as infra code;*.op.tsfiles are discovered automatically by the existing pipeline (no discovery changes needed)lexicons/temporal/src/op/activities/(build, kubectl, helm, wait, gitlab, shell, state, teardown) with proper heartbeating for long-running opslexicons/temporal/src/op/serializer.ts) that generatesdist/ops/<name>/workflow.ts,activities.ts, andworker.tsper Op; handles parallel phases (Promise.all), sequential phases, and gate steps (defineSignal+condition)serializeOpsinto the temporal serializer; re-exports Op builders from@intentius/chant-lexicon-temporalfor single-import convenienceCloses #7
Test plan
npx vitest run packages/core/src/op/op.test.ts— 27 testsnpx vitest run lexicons/temporal/src/op/op-serializer.test.ts— 24 testsnpx vitest run lexicons/temporal/src/serializer.test.ts— 31 tests (includes 8 new Op cases)npx tsc --noEmit -p packages/core/tsconfig.json— cleannpx vitest run— 5514 tests, 468 files, all passing🤖 Generated with Claude Code