vibee-live 0.1.0__py3-none-any.whl
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.
- vibee_live/__init__.py +97 -0
- vibee_live/__main__.py +6 -0
- vibee_live/adapters/__init__.py +1 -0
- vibee_live/adapters/acp.py +621 -0
- vibee_live/adapters/desktop.py +91 -0
- vibee_live/adapters/local.py +81 -0
- vibee_live/adapters/page.py +713 -0
- vibee_live/adapters/relay.py +148 -0
- vibee_live/adapters/relay_server.py +204 -0
- vibee_live/adapters/terminal.py +207 -0
- vibee_live/app/__init__.py +1 -0
- vibee_live/app/command.py +301 -0
- vibee_live/app/companion.py +761 -0
- vibee_live/app/tool.py +239 -0
- vibee_live/delivery.py +352 -0
- vibee_live/events.py +97 -0
- vibee_live/exit_codes.py +6 -0
- vibee_live/loop.py +69 -0
- vibee_live/ports.py +210 -0
- vibee_live/py.typed +0 -0
- vibee_live/testing/__init__.py +184 -0
- vibee_live/testing/fake_agent.py +216 -0
- vibee_live-0.1.0.dist-info/METADATA +44 -0
- vibee_live-0.1.0.dist-info/RECORD +26 -0
- vibee_live-0.1.0.dist-info/WHEEL +4 -0
- vibee_live-0.1.0.dist-info/entry_points.txt +2 -0
vibee_live/__init__.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"""vibee-live: a person's own agent, live inside a product. Pushed events become turns in its session.
|
|
2
|
+
|
|
3
|
+
Everything a product's own command needs is here. The core's names (events, ports, the delivery path, the
|
|
4
|
+
exit codes) are imported with the package and need the standard library only. The companion's (`Config`,
|
|
5
|
+
`run`, `main_run`, `AGENTS`, `agent_command`, `folder`, `port`) live in the composition root,
|
|
6
|
+
`vibee_live.app`, which needs the protocol library: they are loaded when first asked for, so that importing
|
|
7
|
+
this package imports no adapter. The test doubles are in `vibee_live.testing`.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from importlib import import_module
|
|
11
|
+
from typing import TYPE_CHECKING, Any
|
|
12
|
+
|
|
13
|
+
from vibee_live.delivery import Live, Outcome, Policy
|
|
14
|
+
from vibee_live.events import Event, MalformedEvent, Mark, UnreadableCursor, Vocabulary, plain, read_event
|
|
15
|
+
from vibee_live.exit_codes import EXIT_FAILED, EXIT_IN_USE, EXIT_OK, EXIT_SETUP
|
|
16
|
+
from vibee_live.loop import SourceAvailable
|
|
17
|
+
from vibee_live.ports import (
|
|
18
|
+
AgentDriver,
|
|
19
|
+
AgentSession,
|
|
20
|
+
AgentUnavailable,
|
|
21
|
+
ApprovalRequest,
|
|
22
|
+
ApprovalSurface,
|
|
23
|
+
Clock,
|
|
24
|
+
EventSource,
|
|
25
|
+
Notice,
|
|
26
|
+
Notifier,
|
|
27
|
+
Option,
|
|
28
|
+
Saved,
|
|
29
|
+
SessionSpec,
|
|
30
|
+
SourceUnavailable,
|
|
31
|
+
State,
|
|
32
|
+
ToolServer,
|
|
33
|
+
TurnRefused,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
if TYPE_CHECKING:
|
|
37
|
+
from vibee_live.app.command import AGENTS, agent_command, folder, main_run, port
|
|
38
|
+
from vibee_live.app.companion import Config, run
|
|
39
|
+
|
|
40
|
+
# The composition root's names, and the module each is loaded from when first asked for.
|
|
41
|
+
_LATER = {
|
|
42
|
+
"AGENTS": "vibee_live.app.command",
|
|
43
|
+
"Config": "vibee_live.app.companion",
|
|
44
|
+
"run": "vibee_live.app.companion",
|
|
45
|
+
"agent_command": "vibee_live.app.command",
|
|
46
|
+
"folder": "vibee_live.app.command",
|
|
47
|
+
"main_run": "vibee_live.app.command",
|
|
48
|
+
"port": "vibee_live.app.command",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def __getattr__(name: str) -> Any:
|
|
53
|
+
if name not in _LATER:
|
|
54
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
55
|
+
return getattr(import_module(_LATER[name]), name)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
__all__ = [
|
|
59
|
+
"AGENTS",
|
|
60
|
+
"AgentDriver",
|
|
61
|
+
"AgentUnavailable",
|
|
62
|
+
"AgentSession",
|
|
63
|
+
"ApprovalRequest",
|
|
64
|
+
"ApprovalSurface",
|
|
65
|
+
"Clock",
|
|
66
|
+
"Config",
|
|
67
|
+
"EXIT_FAILED",
|
|
68
|
+
"EXIT_IN_USE",
|
|
69
|
+
"EXIT_OK",
|
|
70
|
+
"EXIT_SETUP",
|
|
71
|
+
"Event",
|
|
72
|
+
"EventSource",
|
|
73
|
+
"Live",
|
|
74
|
+
"MalformedEvent",
|
|
75
|
+
"Mark",
|
|
76
|
+
"Notice",
|
|
77
|
+
"Notifier",
|
|
78
|
+
"Option",
|
|
79
|
+
"Outcome",
|
|
80
|
+
"Policy",
|
|
81
|
+
"Saved",
|
|
82
|
+
"SessionSpec",
|
|
83
|
+
"SourceAvailable",
|
|
84
|
+
"SourceUnavailable",
|
|
85
|
+
"State",
|
|
86
|
+
"ToolServer",
|
|
87
|
+
"TurnRefused",
|
|
88
|
+
"UnreadableCursor",
|
|
89
|
+
"Vocabulary",
|
|
90
|
+
"agent_command",
|
|
91
|
+
"folder",
|
|
92
|
+
"main_run",
|
|
93
|
+
"plain",
|
|
94
|
+
"port",
|
|
95
|
+
"read_event",
|
|
96
|
+
"run",
|
|
97
|
+
]
|
vibee_live/__main__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Adapters of the core's ports that are not specific to a product."""
|