Feat v0.9.7 workflow starlark write (#81)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Has been skipped
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m49s
CI/CD / test-sqlite (push) Successful in 3m2s
CI/CD / build-and-deploy (push) Successful in 29s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #81.
This commit is contained in:
2026-04-03 18:30:10 +00:00
committed by xcaliber
parent ac7286f83b
commit 42b864376c
7 changed files with 512 additions and 60 deletions

View File

@@ -82,6 +82,7 @@ type Runner struct {
workspaceRoot string // empty = workspace module unavailable
workspaceQuota int // MB, 0 = unlimited
capabilities map[string]bool // detected environment capabilities
wfEngine WorkflowEngine // nil = workflow write ops unavailable
}
// NewRunner creates a runner with the given sandbox and dependencies.
@@ -139,6 +140,12 @@ func (r *Runner) SetCapabilities(caps map[string]bool) {
r.capabilities = caps
}
// SetWorkflowEngine attaches the workflow engine for write operations
// (start/advance/cancel/submit_signoff) in the workflow Starlark module.
func (r *Runner) SetWorkflowEngine(e WorkflowEngine) {
r.wfEngine = e
}
// SetAllowPrivateIPs disables the SSRF check that blocks connections to
// private/loopback IPs. For self-hosted environments where extensions
// reach internal services. Controlled by EXT_ALLOW_PRIVATE_IPS env var.
@@ -396,7 +403,7 @@ func (r *Runner) buildModulesWithLibCtx(ctx context.Context, packageID string, m
filesLevel = 2
case models.ExtPermWorkflowAccess:
modules["workflow"] = BuildWorkflowModule(ctx, r.stores)
modules["workflow"] = BuildWorkflowModule(ctx, r.stores, r.wfEngine, rc)
case models.ExtPermConnectionsRead:
if r.connResolver != nil && rc != nil && rc.UserID != "" {