Skip to content

feat: env/egress injection, LLM loop fixes, Dockerfile and GHCR release#46

Merged
initializ-mk merged 5 commits intomainfrom
core/package
Apr 17, 2026
Merged

feat: env/egress injection, LLM loop fixes, Dockerfile and GHCR release#46
initializ-mk merged 5 commits intomainfrom
core/package

Conversation

@initializ-mk
Copy link
Copy Markdown
Contributor

Summary

  • Env var & egress domain injection on skill save: When saving a skill via the UI Skill Builder or forge skills add, declared egress_domains are automatically merged into forge.yaml allowlist and env vars are written to .env. Missing env vars are reported back to the UI for user input.
  • LLM loop robustness: Fix tool call execution when providers return FinishReason="stop" alongside tool calls. Add session recovery deduplication to prevent duplicate user messages on retry.
  • OAuth & secrets handling: Proper __oauth__ sentinel handling in Skill Builder provider detection and LLM stream setup.
  • Dockerfile & GHCR release: Multi-stage Dockerfile (alpine:3.22.4 runtime) with multi-arch CI pipeline (linux/amd64, linux/arm64) pushing to ghcr.io/initializ/forge.
  • Documentation sync: Updated runtime, skills, dashboard, deployment, and commands docs to reflect all changes.

Changes

Area Files Description
Parser forge-skills/parser/parser.go Export ExtractForgeReqs for reuse
Types forge-ui/types.go Add SkillSaveResult, SkillEnvEntry; update SkillSaveFunc signature
Utilities forge-cli/cmd/skill_env.go MergeEgressDomains, AppendEnvVars, CheckMissingEnv, ParseSkillRequirements
Tests forge-cli/cmd/skill_env_test.go 12 tests for shared utilities
UI handler forge-ui/handlers_skill_builder.go Pass env vars, return SkillSaveResult
UI save func forge-cli/cmd/ui.go Enhanced save with env/egress handling + OAuth fixes
CLI forge-cli/cmd/skills.go Egress merge in forge skills add
Frontend forge-ui/static/dist/app.js Send env vars, display egress/env info, prompt for missing
LLM loop forge-core/runtime/loop.go Ignore FinishReason, dedup on recovery
Loop tests forge-core/runtime/loop_test.go Regression test for stop+tool_calls
Docker Dockerfile, .dockerignore Multi-stage build, alpine:3.22.4 runtime
CI .github/workflows/release.yaml GHCR multi-arch build+push job
Docs docs/{runtime,skills,dashboard,deployment,commands}.md Sync with code changes

Test plan

  • forge-skills tests pass
  • forge-ui tests pass (updated mock for new return type)
  • forge-cli/cmd tests pass (12 new utility tests)
  • golangci-lint passes with 0 issues across all modules
  • gofmt clean
  • Manual: build Docker image locally (docker build .)
  • Manual: forge ui → Skill Builder → save skill with egress domains → verify forge.yaml updated
  • Manual: forge skills add github → verify egress domains added

…and GHCR release

- Export ExtractForgeReqs in parser for reuse by skill save flow
- Add SkillSaveResult return type with egress_added, env_configured, env_missing
- Create shared utilities (MergeEgressDomains, AppendEnvVars, CheckMissingEnv)
- Wire env var and egress domain handling into UI skill builder save and CLI skills add
- Update frontend to display egress/env info and prompt for missing env vars
- Fix LLM loop to execute tool calls even when FinishReason is "stop"
- Deduplicate user messages on session recovery
- Handle OAuth credentials and __oauth__ sentinels in skill builder provider
- Add multi-arch Dockerfile (linux/amd64, linux/arm64) with multi-stage build
- Add Docker build+push job to release workflow targeting ghcr.io
…cker image

- Update runtime.md: fix loop termination docs (FinishReason ignored), add session recovery dedup
- Update skills.md: document egress domain auto-merge on skill add and Skill Builder save
- Update dashboard.md: add egress/env features, update save endpoint and workflow
- Update deployment.md: add pre-built Docker image section (ghcr.io/initializ/forge)
- Update commands.md: clarify forge skills add egress merging
- Bump Dockerfile runtime to alpine:3.22.4
- PortAllocator.Allocate() now probes port availability via net.Listen
  before allocating, preventing collisions after UI restart
- detectExternalAgent() checks PID liveness before TCP probe and cleans
  up stale serve.json files, preventing ghost agents
- OAuth credential loading in skill builder and runner now surfaces
  errors instead of silently falling through to a client with no auth
@initializ-mk initializ-mk merged commit 147a072 into main Apr 17, 2026
9 checks passed
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