aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-02-18 14:35:35 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-02-18 14:07:46 +0000
commit77d4d9195f8bbb2a19d56ce0fdad2d751d94dadb (patch)
tree1e1b82cd31894be1ad11e5f9e4ded471abbfa329 /pkg
parent477717ad8e35b45fb8bf01f1ee341691ad1ff5c1 (diff)
pkg/aflow: export Context.Close
This will be needed to an MCP server.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/aflow/execute.go4
-rw-r--r--pkg/aflow/test_action.go2
-rw-r--r--pkg/aflow/test_tool.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/pkg/aflow/execute.go b/pkg/aflow/execute.go
index 719001933..9fcfc940b 100644
--- a/pkg/aflow/execute.go
+++ b/pkg/aflow/execute.go
@@ -39,7 +39,7 @@ func (flow *Flow) Execute(ctx context.Context, model, workdir string, inputs map
onEvent: onEvent,
}
- defer c.close()
+ defer c.Close()
if s := ctx.Value(stubContextKey); s != nil {
c.stubContext = *s.(*stubContext)
}
@@ -292,7 +292,7 @@ func (ctx *Context) TempDir() (string, error) {
return dir, nil
}
-func (ctx *Context) close() {
+func (ctx *Context) Close() {
for _, dir := range ctx.cachedDirs {
ctx.cache.Release(dir)
}
diff --git a/pkg/aflow/test_action.go b/pkg/aflow/test_action.go
index a34410cf0..bcb633789 100644
--- a/pkg/aflow/test_action.go
+++ b/pkg/aflow/test_action.go
@@ -28,7 +28,7 @@ func TestAction(t *testing.T, a Action, workdir string, initArgs, wantResults an
timeNow: time.Now,
},
}
- defer ctx.close()
+ defer ctx.Close()
err := a.execute(ctx)
gotResults := map[string]any{}
gotError := ""
diff --git a/pkg/aflow/test_tool.go b/pkg/aflow/test_tool.go
index 9167e65c5..b2f47be74 100644
--- a/pkg/aflow/test_tool.go
+++ b/pkg/aflow/test_tool.go
@@ -28,7 +28,7 @@ func TestTool(t *testing.T, tool Tool, initState, initArgs, wantResults any, wan
ctx := &Context{
state: state,
}
- defer ctx.close()
+ defer ctx.Close()
gotResults, err := tool.execute(ctx, args)
gotError := ""
if err != nil {
@@ -46,6 +46,6 @@ func FuzzTool(t *testing.T, tool Tool, initState, initArgs any) (map[string]any,
ctx := &Context{
state: state,
}
- defer ctx.close()
+ defer ctx.Close()
return tool.execute(ctx, args)
}