Design analysis: JavaScript functions for fcli actions#916
Draft
Design analysis: JavaScript functions for fcli actions#916
Conversation
Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Assess benefits of fcli action syntax for function definitions
Design analysis: JavaScript functions for fcli actions
Feb 4, 2026
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.
Research question: Should fcli actions support function definitions callable from steps and exposable as MCP tools? If so, YAML/SpEL vs JavaScript vs other languages?
Recommendation
Add JavaScript function support via GraalVM JS (~3-4MB). Maintains SpEL backward compatibility.
Rationale: JavaScript provides superior IDE tooling (autocomplete, debugging), AI code generation quality, and developer familiarity compared to SpEL string expressions. GraalVM native image compatible with acceptable overhead.
Proposed Syntax
Functions access fcli through bridge API:
fcli.vars,fcli.rest,fcli.exec,fcli.spel,fcli.log.Documents Delivered
Security
Sandboxed execution with no file system/network/reflection access. Resource limits: CPU time (30s), memory (64MB), statement count. All external operations via validated fcli API.
Implementation Phases
vars,log)rest,exec,spel), MCP tool exposure, IDE toolingNext Steps
Stakeholder review → security validation → implementation planning.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.