maf-sandbox-codeact 0.7.2__tar.gz → 0.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maf-sandbox-codeact
3
- Version: 0.7.2
3
+ Version: 0.7.4
4
4
  Summary: CodeAct as a Microsoft Agent Framework tool — the model writes a short Python program and it runs inside a sandbox — written against maf-sandbox so it runs on any sandbox backend.
5
5
  Keywords: codeact,code-execution,sandbox,agent-framework,microsoft-agent-framework
6
6
  Author: SOKOLAI BV
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Programming Language :: Python :: 3.14
17
17
  Classifier: Topic :: Software Development :: Interpreters
18
- Requires-Dist: maf-sandbox>=0.20.0,<0.22
18
+ Requires-Dist: maf-sandbox>=0.23.1,<0.25
19
19
  Requires-Dist: agent-framework-core>=1.13.0,<2
20
20
  Requires-Python: >=3.12, <3.15
21
21
  Project-URL: Homepage, https://www.sokol.ai
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "maf-sandbox-codeact"
3
- version = "0.7.2"
3
+ version = "0.7.4"
4
4
  description = "CodeAct as a Microsoft Agent Framework tool — the model writes a short Python program and it runs inside a sandbox — written against maf-sandbox so it runs on any sandbox backend."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12,<3.15"
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Topic :: Software Development :: Interpreters",
25
25
  ]
26
26
  dependencies = [
27
- "maf-sandbox>=0.20.0,<0.22",
27
+ "maf-sandbox>=0.23.1,<0.25",
28
28
  "agent-framework-core>=1.13.0,<2",
29
29
  ]
30
30
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "maf-sandbox-codeact"
3
- version = "0.7.2"
3
+ version = "0.7.4"
4
4
  description = "CodeAct as a Microsoft Agent Framework tool — the model writes a short Python program and it runs inside a sandbox — written against maf-sandbox so it runs on any sandbox backend."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12,<3.15"
@@ -31,10 +31,11 @@ dependencies = [
31
31
  # before 1.0.0 may include breaking changes (see its CHANGELOG). Moving either end of
32
32
  # this range has an order to it — see RELEASING.md. The floor tracks the release where
33
33
  # the vocabulary this kind's spec names actually arrives; admit anything older and a
34
- # published wheel resolves a maf-sandbox base missing those imports. The number itself is
35
- # below, and `scripts/set_dependents_range.py` moves it — so this says which release the
36
- # floor is for, never which release that is.
37
- "maf-sandbox>=0.20.0,<0.22",
34
+ # published wheel resolves a maf-sandbox base missing it — a keyword argument as much as an
35
+ # import, and that one fails at the call, where no import check is looking. The number
36
+ # itself is below, and `scripts/set_dependents_range.py` moves it — so this says which
37
+ # release the floor is for, never which release that is.
38
+ "maf-sandbox>=0.23.1,<0.25",
38
39
  # The `@tool` decorator. MAF is a genuine dependency of the tool itself, not of the host
39
40
  # application.
40
41
  "agent-framework-core>=1.13.0,<2",
@@ -371,17 +371,14 @@ def make_codeact_tools(
371
371
  # A single dispatch may exercise the user's delegated authority, and which one does is not
372
372
  # knowable before the program runs, so one such tool raises the whole surface.
373
373
  approval_gated = surface is not None and surface.requires_approval
374
- # A registry can carry something out with no landing artifact to say so, which is the one
375
- # flow `sandbox_tool_declarations` cannot see — so the host's cap is written by hand. Only
376
- # with no output sink: with one, the spec already lands, the derivation writes the same
377
- # cap, and `sandboxed_tool` refuses the two together.
378
- declarations = (
379
- {"max_allowed_confidentiality": outbound_max_confidentiality}
380
- if surface is not None
381
- and (surface.outbound_caps or surface.has_undeclared)
382
- and outbound_max_confidentiality is not None
383
- and output_sink is None
384
- else None
374
+ # A registry can carry something out with no landing artifact to say so — a tool with a
375
+ # declared sink, or an unstamped one that might have one — the one flow neither
376
+ # `egress_allow` nor an `output_sink` reveals. `also_carries_out` folds that fact, which
377
+ # only the kind can see, into `sandbox_tool_declarations`' single rule, so the condition
378
+ # lives in one place instead of being hand-built here (and a key that rule learns later
379
+ # reaches this tool too).
380
+ registry_carries_out = surface is not None and bool(
381
+ surface.outbound_caps or surface.has_undeclared
385
382
  )
386
383
  return sandboxed_tool(
387
384
  lambda session: _execute_code_tool(
@@ -393,7 +390,7 @@ def make_codeact_tools(
393
390
  spec=spec,
394
391
  name=EXECUTE_CODE_TOOL_NAME,
395
392
  approval_mode="always_require" if approval_gated else "never_require",
396
- declarations=declarations,
393
+ also_carries_out=registry_carries_out,
397
394
  # The library's "trusted" default is right for a compiler's diagnostics and wrong here:
398
395
  # what comes back is whatever a model-written `print(...)` chose to emit. Undeclared,
399
396
  # the tracker's untrusted default applies and the result taints the conversation.