roboz 0.1.2.dev9__tar.gz → 0.1.2.dev10__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.
Files changed (68) hide show
  1. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/CHANGELOG.md +6 -0
  2. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/PKG-INFO +3 -3
  3. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/README.md +2 -2
  4. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/pyproject.toml +1 -1
  5. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/core.py +16 -4
  6. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/deployment.py +6 -2
  7. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/.gitignore +0 -0
  8. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/LICENSE +0 -0
  9. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/__init__.py +0 -0
  10. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/__init__.pyi +0 -0
  11. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/_naming.py +0 -0
  12. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/__init__.py +0 -0
  13. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/_execution_context.py +0 -0
  14. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/_identifiers.py +0 -0
  15. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/_notifications.py +0 -0
  16. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/_prompts.py +0 -0
  17. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/_tool_observer.py +0 -0
  18. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/background_agent.py +0 -0
  19. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/prompt_agent_tool.py +0 -0
  20. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/agent/subagent.py +0 -0
  21. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/dependencies.py +0 -0
  22. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/exceptions.py +0 -0
  23. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/__init__.py +0 -0
  24. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/_diagnostics.py +0 -0
  25. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/_retry.py +0 -0
  26. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/_truncation.py +0 -0
  27. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/binding.py +0 -0
  28. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/calls.py +0 -0
  29. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/completion.py +0 -0
  30. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/endpoints.py +0 -0
  31. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/openai_compatible.py +0 -0
  32. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/openrouter.py +0 -0
  33. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/llm/prompts.py +0 -0
  34. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/__init__.py +0 -0
  35. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/_schema.py +0 -0
  36. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/_serialization.py +0 -0
  37. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/_telemetry.py +0 -0
  38. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/core.py +0 -0
  39. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/messages.py +0 -0
  40. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/models/truncation.py +0 -0
  41. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/py.typed +0 -0
  42. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/__init__.py +0 -0
  43. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/_environment.py +0 -0
  44. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/_external.py +0 -0
  45. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/_logging.py +0 -0
  46. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/_paths.py +0 -0
  47. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/events.py +0 -0
  48. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/io.py +0 -0
  49. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/observability.py +0 -0
  50. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/persistence/__init__.py +0 -0
  51. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/persistence/activity.py +0 -0
  52. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/persistence/schema.py +0 -0
  53. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/pipe.py +0 -0
  54. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/runtime/sinks.py +0 -0
  55. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/skill/__init__.py +0 -0
  56. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/skill/_prompts.py +0 -0
  57. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/skill/core.py +0 -0
  58. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/__init__.py +0 -0
  59. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/_prompts.py +0 -0
  60. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/_protocols.py +0 -0
  61. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/_typing.py +0 -0
  62. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/context.py +0 -0
  63. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/core.py +0 -0
  64. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tooling/decorators.py +0 -0
  65. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tools/__init__.py +0 -0
  66. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tools/_identifiers.py +0 -0
  67. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tools/control.py +0 -0
  68. {roboz-0.1.2.dev9 → roboz-0.1.2.dev10}/src/roboz/tools/interaction.py +0 -0
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.2.dev10 - 2026-09-21
6
+
7
+ - Define default tools as scheduler-owned chain roots: downstream tools can now
8
+ reference a default-only parent with `chained_to`, while defaults that are
9
+ themselves chained downstream are rejected during agent construction.
10
+
5
11
  ## 0.1.2.dev9 - 2026-09-20
6
12
 
7
13
  - Remove the leftover `proton-bridge-beta` installation extra. Install
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: roboz
3
- Version: 0.1.2.dev9
3
+ Version: 0.1.2.dev10
4
4
  Import-Name: roboz
5
5
  Summary: Typed primitives for composable agentic workflows
6
6
  Project-URL: Homepage, https://github.com/Tachion-Oy/roboz
@@ -122,7 +122,7 @@ An agent is a loop that calls tools. Everything is defined as a tool: Skills, b
122
122
  **A tool can be triggered in three ways:**
123
123
  - **Invoked by an agent**: The `prompt_agent` tool asks an LLM what to do next and its `Invoke` output always calls another tool. It is constructed internally for `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` agents, but it is still just a tool.
124
124
  - **By chaining**. After an invoked tool has fired RoboZ checks if a chained tool with a *true* chain condition exists (for more than one *true* condition for a fork you get a runtime error). If yes, the output is passed on and the process repeats until the first broken chain or all chained tools are exhausted
125
- - **As default tools**. Once the tool chain is exhausted or the chain breaks due to a *false* condition the loop returns to the freely defined `default_tool` (there actually can be many, they are all called in sequence).
125
+ - **As default tools**. Defaults are ordered chain roots owned by the scheduler. When no chained successor exists, they run in configuration order; a default may feed downstream tools, and the sequence resumes with the next default after that branch ends. A default cannot itself be downstream, so it cannot declare `chained_to`.
126
126
 
127
127
  RoboZ then collapses to the traditional agentic approach as a special case if one just has the `prompt_agent` as the default with no chaining. An `AgentMode.DETERMINISTIC` agent has no `prompt_agent`; its default tools perform tasks directly, allowing deterministic branching through chaining. This is useful for a background agent that performs periodic maintenance work. `AgentMode.STEERABLE` agents may ask the user for input, while `AgentMode.AUTONOMOUS` agents cannot.
128
128
 
@@ -145,7 +145,7 @@ To see the above in practice see the [complex example](https://github.com/Tachio
145
145
 
146
146
  In the code example below we illustrate some of the features that make RoboZ different from other frameworks.
147
147
 
148
- **Tool chaining** is usually introduced via the decorator argument `chained_to` which indicates the name of the tool whose output is passed as the input (the tools also possess a `.chain` method). The input/output contract must be Liskov compatible, i.e the upstream output must be a subclass of the downstream input. A possible `chain_condition` can be passed in, which by definition has access to the tool's input argument and returns a boolean. The chain condition must evaluate to at most one true condition, but it can evaluate to `false` on all links, in which case you return to the default tool(s). `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` construct a `prompt_agent` tool backed by the agent endpoint; `AgentMode.DETERMINISTIC` uses the configured default tools.
148
+ **Tool chaining** is usually introduced via the decorator argument `chained_to`, which points from a downstream tool to the upstream tool whose output becomes its input (tools also possess a `.chain` method). The input/output contract must be Liskov compatible, i.e. the upstream output must be a subclass of the downstream input. A possible `chain_condition` can be passed in, which by definition has access to the tool's input argument and returns a boolean. The chain condition must evaluate to at most one true condition, but it can evaluate to `false` on all links, in which case scheduling resumes with the next configured default. Defaults may be referenced as upstream parents without also appearing in `tools`, but cannot declare `chained_to` themselves. `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` construct a `prompt_agent` tool backed by the agent endpoint; `AgentMode.DETERMINISTIC` uses the configured default tools.
149
149
 
150
150
  The `escalate` is an example of a **tool factory**, which is a simple concept. It accepts a context parameter which is added to the tool's closure and calling the factory with a context argument returns a tool. A very common use case is a tool with an endpoint as a context. In RoboZ all llm **endpoints are instances**, so it is easy to have a specific endpoint for a tool, that is different from that of the agent, below we construct deterministic mock endpoints so that no API keys are required for the examples. Factories have precisely the same chaining arguments in their decorator as a tool.
151
151
 
@@ -95,7 +95,7 @@ An agent is a loop that calls tools. Everything is defined as a tool: Skills, b
95
95
  **A tool can be triggered in three ways:**
96
96
  - **Invoked by an agent**: The `prompt_agent` tool asks an LLM what to do next and its `Invoke` output always calls another tool. It is constructed internally for `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` agents, but it is still just a tool.
97
97
  - **By chaining**. After an invoked tool has fired RoboZ checks if a chained tool with a *true* chain condition exists (for more than one *true* condition for a fork you get a runtime error). If yes, the output is passed on and the process repeats until the first broken chain or all chained tools are exhausted
98
- - **As default tools**. Once the tool chain is exhausted or the chain breaks due to a *false* condition the loop returns to the freely defined `default_tool` (there actually can be many, they are all called in sequence).
98
+ - **As default tools**. Defaults are ordered chain roots owned by the scheduler. When no chained successor exists, they run in configuration order; a default may feed downstream tools, and the sequence resumes with the next default after that branch ends. A default cannot itself be downstream, so it cannot declare `chained_to`.
99
99
 
100
100
  RoboZ then collapses to the traditional agentic approach as a special case if one just has the `prompt_agent` as the default with no chaining. An `AgentMode.DETERMINISTIC` agent has no `prompt_agent`; its default tools perform tasks directly, allowing deterministic branching through chaining. This is useful for a background agent that performs periodic maintenance work. `AgentMode.STEERABLE` agents may ask the user for input, while `AgentMode.AUTONOMOUS` agents cannot.
101
101
 
@@ -118,7 +118,7 @@ To see the above in practice see the [complex example](https://github.com/Tachio
118
118
 
119
119
  In the code example below we illustrate some of the features that make RoboZ different from other frameworks.
120
120
 
121
- **Tool chaining** is usually introduced via the decorator argument `chained_to` which indicates the name of the tool whose output is passed as the input (the tools also possess a `.chain` method). The input/output contract must be Liskov compatible, i.e the upstream output must be a subclass of the downstream input. A possible `chain_condition` can be passed in, which by definition has access to the tool's input argument and returns a boolean. The chain condition must evaluate to at most one true condition, but it can evaluate to `false` on all links, in which case you return to the default tool(s). `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` construct a `prompt_agent` tool backed by the agent endpoint; `AgentMode.DETERMINISTIC` uses the configured default tools.
121
+ **Tool chaining** is usually introduced via the decorator argument `chained_to`, which points from a downstream tool to the upstream tool whose output becomes its input (tools also possess a `.chain` method). The input/output contract must be Liskov compatible, i.e. the upstream output must be a subclass of the downstream input. A possible `chain_condition` can be passed in, which by definition has access to the tool's input argument and returns a boolean. The chain condition must evaluate to at most one true condition, but it can evaluate to `false` on all links, in which case scheduling resumes with the next configured default. Defaults may be referenced as upstream parents without also appearing in `tools`, but cannot declare `chained_to` themselves. `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` construct a `prompt_agent` tool backed by the agent endpoint; `AgentMode.DETERMINISTIC` uses the configured default tools.
122
122
 
123
123
  The `escalate` is an example of a **tool factory**, which is a simple concept. It accepts a context parameter which is added to the tool's closure and calling the factory with a context argument returns a tool. A very common use case is a tool with an endpoint as a context. In RoboZ all llm **endpoints are instances**, so it is easy to have a specific endpoint for a tool, that is different from that of the agent, below we construct deterministic mock endpoints so that no API keys are required for the examples. Factories have precisely the same chaining arguments in their decorator as a tool.
124
124
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "roboz"
3
- version = "0.1.2.dev9"
3
+ version = "0.1.2.dev10"
4
4
  description = "Typed primitives for composable agentic workflows"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Tachion Oy" }]
@@ -83,6 +83,14 @@ class Agent(HasExternalDependencies):
83
83
  list of callbacks attached to a newly created pipe. Hosts compose CLI,
84
84
  run-scoped, process-scoped, or agent-specific callbacks before creating the
85
85
  agent; Agent does not construct or distinguish those scopes.
86
+
87
+ ``default_tools`` are scheduler-owned chain roots. The scheduler runs them in
88
+ configuration order whenever the current tool has no chained successor, then
89
+ repeats that sequence in the next cycle. A downstream tool may declare
90
+ ``chained_to=default_tool``; when that branch ends, scheduling resumes with the
91
+ next configured default. A default tool cannot itself declare ``chained_to``
92
+ because defaults cannot be downstream tools. Default-only tools remain hidden
93
+ from the model-facing active and passive registries.
86
94
  """
87
95
 
88
96
  def __init__(
@@ -280,23 +288,27 @@ class Agent(HasExternalDependencies):
280
288
 
281
289
  def _init_tools(self, *, tools: Sequence[Tool], skill: Skill | None):
282
290
  for t in self.default_tools:
291
+ if t.chained_to:
292
+ raise ValueError(
293
+ f"Default tool '{t.name}' cannot declare chained_to"
294
+ )
283
295
  if any(
284
296
  issubclass(output_type, Invoke)
285
297
  for output_type in get_constituent_types(t.OutputModel)
286
298
  ):
287
299
  raise ValueError(f"Default tool '{t.name}' cannot return Invoke")
288
300
 
289
- all_tools = set(tools)
301
+ registered_tools = set(tools)
290
302
  if skill:
291
- all_tools |= set(skill.tools)
303
+ registered_tools |= set(skill.tools)
292
304
 
293
- for t in all_tools:
305
+ for t in registered_tools:
294
306
  if t.chained_to:
295
307
  self.passive_tools[t.id] = t
296
308
  continue
297
309
  self.active_tools[t.id] = t
298
310
  self._init_prompt_agent_tool()
299
- self._validate_tool_chains(all_tools)
311
+ self._validate_tool_chains(registered_tools | set(self.default_tools))
300
312
 
301
313
  def external_dependencies(
302
314
  self,
@@ -41,8 +41,12 @@ class AgentCapability(Protocol):
41
41
  class Capability(AgentCapability):
42
42
  """Already-bound tools and skills that provide an agent feature.
43
43
 
44
- Tools shared between a chain and default execution retain their identity.
45
- Supplied objects remain caller-owned and require no owner configuration.
44
+ ``default_tools`` are ordered, repeatedly scheduled chain roots. A tool in
45
+ ``tools`` may declare ``chained_to`` with one of those defaults as its parent,
46
+ and scheduling resumes with the next default when the downstream branch ends.
47
+ Defaults cannot themselves declare ``chained_to``. Tools shared between
48
+ ``tools`` and ``default_tools`` retain their identity. Supplied objects remain
49
+ caller-owned and require no owner configuration.
46
50
  """
47
51
 
48
52
  tools: tuple[Tool | Sequence[Tool], ...] = ()
File without changes
File without changes