optio-agents-all 0.1.0__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.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.4
2
+ Name: optio-agents-all
3
+ Version: 0.1.0
4
+ Summary: Meta-factory over all wrapped optio agent engines: create_task dispatched by a tagged TaskConfig union.
5
+ Author-email: Kristof Csillag <kristof.csillag@deai-labs.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/deai-network/optio
8
+ Project-URL: Repository, https://github.com/deai-network/optio
9
+ Project-URL: Issues, https://github.com/deai-network/optio/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Classifier: Framework :: AsyncIO
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: optio-agents<0.5,>=0.4
24
+ Requires-Dist: optio-opencode<0.4,>=0.3
25
+ Requires-Dist: optio-claudecode<0.5,>=0.4
26
+ Requires-Dist: optio-grok<0.3,>=0.2
27
+ Requires-Dist: optio-codex<0.3,>=0.2
28
+ Requires-Dist: optio-cursor<0.3,>=0.2
29
+ Requires-Dist: optio-kimicode<0.2,>=0.1
30
+ Requires-Dist: optio-antigravity<0.2,>=0.1
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
34
+ Requires-Dist: pytest-xdist>=3.6; extra == "dev"
35
+
36
+ # optio-agents-all
37
+
38
+ Meta-factory over every wrapped optio agent engine. Exposes a single
39
+ `create_task(process_id, name, config, description=None, metadata=None)` that
40
+ dispatches to the correct per-engine factory based on `config.agent_type`, over
41
+ a tagged discriminated union (`AgentTaskConfig`) of the seven engine
42
+ `TaskConfig` dataclasses.
43
+
44
+ ```python
45
+ import optio_agents_all as aa
46
+
47
+ cfg = aa.ClaudeCodeTaskConfig(consumer_instructions="…")
48
+ task = aa.create_task(process_id, name, cfg)
49
+ ```
50
+
51
+ Re-exports the seven `<Engine>TaskConfig` classes, the seven
52
+ `create_<engine>_task` factories, the `AgentType` literal, and the
53
+ `AgentTaskConfig` union.
@@ -0,0 +1,18 @@
1
+ # optio-agents-all
2
+
3
+ Meta-factory over every wrapped optio agent engine. Exposes a single
4
+ `create_task(process_id, name, config, description=None, metadata=None)` that
5
+ dispatches to the correct per-engine factory based on `config.agent_type`, over
6
+ a tagged discriminated union (`AgentTaskConfig`) of the seven engine
7
+ `TaskConfig` dataclasses.
8
+
9
+ ```python
10
+ import optio_agents_all as aa
11
+
12
+ cfg = aa.ClaudeCodeTaskConfig(consumer_instructions="…")
13
+ task = aa.create_task(process_id, name, cfg)
14
+ ```
15
+
16
+ Re-exports the seven `<Engine>TaskConfig` classes, the seven
17
+ `create_<engine>_task` factories, the `AgentType` literal, and the
18
+ `AgentTaskConfig` union.
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "optio-agents-all"
7
+ version = "0.1.0"
8
+ description = "Meta-factory over all wrapped optio agent engines: create_task dispatched by a tagged TaskConfig union."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ requires-python = ">=3.11"
12
+ authors = [
13
+ { name = "Kristof Csillag", email = "kristof.csillag@deai-labs.com" },
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Operating System :: POSIX :: Linux",
22
+ "Operating System :: MacOS",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
25
+ "Topic :: Software Development :: Code Generators",
26
+ "Framework :: AsyncIO",
27
+ ]
28
+ dependencies = [
29
+ "optio-agents>=0.4,<0.5",
30
+ "optio-opencode>=0.3,<0.4",
31
+ "optio-claudecode>=0.4,<0.5",
32
+ "optio-grok>=0.2,<0.3",
33
+ "optio-codex>=0.2,<0.3",
34
+ "optio-cursor>=0.2,<0.3",
35
+ "optio-kimicode>=0.1,<0.2",
36
+ "optio-antigravity>=0.1,<0.2",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ dev = [
41
+ "pytest>=8.0",
42
+ "pytest-asyncio>=0.23",
43
+ "pytest-xdist>=3.6",
44
+ ]
45
+
46
+ [project.urls]
47
+ Homepage = "https://github.com/deai-network/optio"
48
+ Repository = "https://github.com/deai-network/optio"
49
+ Issues = "https://github.com/deai-network/optio/issues"
50
+
51
+ [tool.setuptools.packages.find]
52
+ where = ["src"]
53
+
54
+ [tool.pytest.ini_options]
55
+ asyncio_mode = "auto"
56
+ testpaths = ["tests"]
57
+ markers = [
58
+ "serial: spawn-heavy, timing-fragile test that must run in a final non-parallel phase",
59
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,49 @@
1
+ """optio-agents-all — meta-factory over every wrapped optio agent engine.
2
+
3
+ Exposes a single ``create_task`` that dispatches to the right per-engine
4
+ factory based on ``config.agent_type``, over a tagged discriminated union
5
+ of the seven engine ``TaskConfig`` dataclasses.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from optio_antigravity import create_antigravity_task
11
+ from optio_claudecode import create_claudecode_task
12
+ from optio_codex import create_codex_task
13
+ from optio_cursor import create_cursor_task
14
+ from optio_grok import create_grok_task
15
+ from optio_kimicode import create_kimicode_task
16
+ from optio_opencode import create_opencode_task
17
+
18
+ from optio_agents_all.factory import create_task
19
+ from optio_agents_all.types import (
20
+ AgentTaskConfig,
21
+ AgentType,
22
+ AntigravityTaskConfig,
23
+ ClaudeCodeTaskConfig,
24
+ CodexTaskConfig,
25
+ CursorTaskConfig,
26
+ GrokTaskConfig,
27
+ KimiCodeTaskConfig,
28
+ OpencodeTaskConfig,
29
+ )
30
+
31
+ __all__ = [
32
+ "create_task",
33
+ "AgentType",
34
+ "AgentTaskConfig",
35
+ "KimiCodeTaskConfig",
36
+ "GrokTaskConfig",
37
+ "CursorTaskConfig",
38
+ "ClaudeCodeTaskConfig",
39
+ "CodexTaskConfig",
40
+ "OpencodeTaskConfig",
41
+ "AntigravityTaskConfig",
42
+ "create_kimicode_task",
43
+ "create_grok_task",
44
+ "create_cursor_task",
45
+ "create_claudecode_task",
46
+ "create_codex_task",
47
+ "create_opencode_task",
48
+ "create_antigravity_task",
49
+ ]
@@ -0,0 +1,39 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Callable
4
+
5
+ from optio_antigravity import create_antigravity_task
6
+ from optio_claudecode import create_claudecode_task
7
+ from optio_codex import create_codex_task
8
+ from optio_cursor import create_cursor_task
9
+ from optio_grok import create_grok_task
10
+ from optio_kimicode import create_kimicode_task
11
+ from optio_opencode import create_opencode_task
12
+
13
+ from optio_agents_all.types import AgentTaskConfig, AgentType
14
+
15
+ _REGISTRY: dict[AgentType, Callable] = {
16
+ "kimicode": create_kimicode_task,
17
+ "grok": create_grok_task,
18
+ "cursor": create_cursor_task,
19
+ "claudecode": create_claudecode_task,
20
+ "codex": create_codex_task,
21
+ "opencode": create_opencode_task,
22
+ "antigravity": create_antigravity_task,
23
+ }
24
+
25
+
26
+ def create_task(
27
+ process_id,
28
+ name,
29
+ config: AgentTaskConfig,
30
+ description=None,
31
+ metadata=None,
32
+ ):
33
+ """Create a task for any wrapped agent, dispatched by config.agent_type."""
34
+ factory = _REGISTRY.get(config.agent_type)
35
+ if factory is None:
36
+ raise ValueError(f"unknown agent_type: {config.agent_type!r}")
37
+ return factory(
38
+ process_id, name, config, description=description, metadata=metadata
39
+ ) # type: ignore[arg-type]
@@ -0,0 +1,31 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Literal
4
+
5
+ from optio_antigravity.types import AntigravityTaskConfig
6
+ from optio_claudecode.types import ClaudeCodeTaskConfig
7
+ from optio_codex.types import CodexTaskConfig
8
+ from optio_cursor.types import CursorTaskConfig
9
+ from optio_grok.types import GrokTaskConfig
10
+ from optio_kimicode.types import KimiCodeTaskConfig
11
+ from optio_opencode.types import OpencodeTaskConfig
12
+
13
+ AgentType = Literal[
14
+ "kimicode",
15
+ "grok",
16
+ "cursor",
17
+ "claudecode",
18
+ "codex",
19
+ "opencode",
20
+ "antigravity",
21
+ ]
22
+
23
+ AgentTaskConfig = (
24
+ KimiCodeTaskConfig
25
+ | GrokTaskConfig
26
+ | CursorTaskConfig
27
+ | ClaudeCodeTaskConfig
28
+ | CodexTaskConfig
29
+ | OpencodeTaskConfig
30
+ | AntigravityTaskConfig
31
+ )
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.4
2
+ Name: optio-agents-all
3
+ Version: 0.1.0
4
+ Summary: Meta-factory over all wrapped optio agent engines: create_task dispatched by a tagged TaskConfig union.
5
+ Author-email: Kristof Csillag <kristof.csillag@deai-labs.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/deai-network/optio
8
+ Project-URL: Repository, https://github.com/deai-network/optio
9
+ Project-URL: Issues, https://github.com/deai-network/optio/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Classifier: Framework :: AsyncIO
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: optio-agents<0.5,>=0.4
24
+ Requires-Dist: optio-opencode<0.4,>=0.3
25
+ Requires-Dist: optio-claudecode<0.5,>=0.4
26
+ Requires-Dist: optio-grok<0.3,>=0.2
27
+ Requires-Dist: optio-codex<0.3,>=0.2
28
+ Requires-Dist: optio-cursor<0.3,>=0.2
29
+ Requires-Dist: optio-kimicode<0.2,>=0.1
30
+ Requires-Dist: optio-antigravity<0.2,>=0.1
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
34
+ Requires-Dist: pytest-xdist>=3.6; extra == "dev"
35
+
36
+ # optio-agents-all
37
+
38
+ Meta-factory over every wrapped optio agent engine. Exposes a single
39
+ `create_task(process_id, name, config, description=None, metadata=None)` that
40
+ dispatches to the correct per-engine factory based on `config.agent_type`, over
41
+ a tagged discriminated union (`AgentTaskConfig`) of the seven engine
42
+ `TaskConfig` dataclasses.
43
+
44
+ ```python
45
+ import optio_agents_all as aa
46
+
47
+ cfg = aa.ClaudeCodeTaskConfig(consumer_instructions="…")
48
+ task = aa.create_task(process_id, name, cfg)
49
+ ```
50
+
51
+ Re-exports the seven `<Engine>TaskConfig` classes, the seven
52
+ `create_<engine>_task` factories, the `AgentType` literal, and the
53
+ `AgentTaskConfig` union.
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/optio_agents_all/__init__.py
4
+ src/optio_agents_all/factory.py
5
+ src/optio_agents_all/types.py
6
+ src/optio_agents_all.egg-info/PKG-INFO
7
+ src/optio_agents_all.egg-info/SOURCES.txt
8
+ src/optio_agents_all.egg-info/dependency_links.txt
9
+ src/optio_agents_all.egg-info/requires.txt
10
+ src/optio_agents_all.egg-info/top_level.txt
11
+ tests/test_meta_factory.py
@@ -0,0 +1,13 @@
1
+ optio-agents<0.5,>=0.4
2
+ optio-opencode<0.4,>=0.3
3
+ optio-claudecode<0.5,>=0.4
4
+ optio-grok<0.3,>=0.2
5
+ optio-codex<0.3,>=0.2
6
+ optio-cursor<0.3,>=0.2
7
+ optio-kimicode<0.2,>=0.1
8
+ optio-antigravity<0.2,>=0.1
9
+
10
+ [dev]
11
+ pytest>=8.0
12
+ pytest-asyncio>=0.23
13
+ pytest-xdist>=3.6
@@ -0,0 +1 @@
1
+ optio_agents_all
@@ -0,0 +1,68 @@
1
+ from typing import get_args
2
+
3
+ import pytest
4
+
5
+ import optio_agents_all as aa
6
+ from optio_agents_all.factory import _REGISTRY
7
+ from optio_agents_all.types import AgentType
8
+
9
+
10
+ def test_every_slug_registered_and_in_union():
11
+ slugs = set(get_args(AgentType))
12
+ assert set(_REGISTRY) == slugs
13
+ # union covers exactly the 7 configs
14
+ union_types = {t.__name__ for t in get_args(aa.AgentTaskConfig)}
15
+ assert len(union_types) == 7
16
+
17
+
18
+ def test_create_task_dispatches_by_agent_type(monkeypatch):
19
+ called = {}
20
+ for slug in _REGISTRY:
21
+ monkeypatch.setitem(
22
+ _REGISTRY,
23
+ slug,
24
+ lambda p, n, c, description=None, metadata=None, _s=slug: called.setdefault(
25
+ "hit", _s
26
+ ),
27
+ )
28
+ cfg = aa.KimiCodeTaskConfig(consumer_instructions="x")
29
+ aa.create_task("pid", "nm", cfg)
30
+ assert called["hit"] == "kimicode"
31
+
32
+
33
+ def test_unknown_agent_type_raises():
34
+ cfg = aa.GrokTaskConfig(consumer_instructions="x")
35
+ object.__setattr__(cfg, "agent_type", "bogus")
36
+ with pytest.raises(ValueError):
37
+ aa.create_task("pid", "nm", cfg)
38
+
39
+
40
+ def test_import_surface():
41
+ for name in (
42
+ "create_task",
43
+ "AgentTaskConfig",
44
+ "AgentType",
45
+ "KimiCodeTaskConfig",
46
+ "GrokTaskConfig",
47
+ "CursorTaskConfig",
48
+ "ClaudeCodeTaskConfig",
49
+ "CodexTaskConfig",
50
+ "OpencodeTaskConfig",
51
+ "AntigravityTaskConfig",
52
+ "create_kimicode_task",
53
+ "create_grok_task",
54
+ "create_cursor_task",
55
+ "create_claudecode_task",
56
+ "create_codex_task",
57
+ "create_opencode_task",
58
+ "create_antigravity_task",
59
+ ):
60
+ assert hasattr(aa, name), name
61
+
62
+
63
+ def test_agent_type_defaults_per_engine():
64
+ assert aa.KimiCodeTaskConfig(consumer_instructions="x").agent_type == "kimicode"
65
+ assert aa.GrokTaskConfig(consumer_instructions="x").agent_type == "grok"
66
+ assert (
67
+ aa.AntigravityTaskConfig(consumer_instructions="x").agent_type == "antigravity"
68
+ )