Skip to content

cmd/sgai/skel: gate workbench MCP on session env#37

Merged
ucirello merged 1 commit intomainfrom
push-mpsspomsszsx
Apr 1, 2026
Merged

cmd/sgai/skel: gate workbench MCP on session env#37
ucirello merged 1 commit intomainfrom
push-mpsspomsszsx

Conversation

@ucirello
Copy link
Copy Markdown
Owner

@ucirello ucirello commented Apr 1, 2026

Summary

  • only register the sgai MCP bridge when all session-scoped env vars are present, so workbench config never emits an empty stdio command
  • cover the MCP env gating in the Bun plugin tests and assert adhoc prompt actions only export the workspace .sgai config directory
  • replace the interrupt flush timeout race in executeAgentProcess with require.Eventually polling so the Go test stops depending on a fixed deadline

Test Plan

  • go test ./cmd/sgai -run 'TestExecuteAgentProcessFlushesBufferedTextOnInterrupt|TestBuildPromptActionCommandSpecUsesOnlyWorkspaceConfigDirEnv'
  • bun test ./cmd/sgai/skel/.sgai/plugin/workbench.test.ts

@ucirello ucirello marked this pull request as ready for review April 1, 2026 18:37
@ucirello ucirello merged commit 9a8407b into main Apr 1, 2026
2 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