tau-core 0.2.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.
Files changed (47) hide show
  1. tau_core/__init__.py +153 -0
  2. tau_core/__main__.py +6 -0
  3. tau_core/_version.py +10 -0
  4. tau_core/agent.py +783 -0
  5. tau_core/approval.py +513 -0
  6. tau_core/builder.py +869 -0
  7. tau_core/builtin_tools.py +37 -0
  8. tau_core/channels/__init__.py +1 -0
  9. tau_core/channels/terminal.py +533 -0
  10. tau_core/cli.py +128 -0
  11. tau_core/commands.py +89 -0
  12. tau_core/compaction.py +201 -0
  13. tau_core/config.py +479 -0
  14. tau_core/events.py +93 -0
  15. tau_core/hub/__init__.py +54 -0
  16. tau_core/hub/cli.py +374 -0
  17. tau_core/hub/control.py +238 -0
  18. tau_core/hub/daemon.py +286 -0
  19. tau_core/hub/launchd.py +164 -0
  20. tau_core/hub/lock.py +101 -0
  21. tau_core/hub/state.py +227 -0
  22. tau_core/hub/templates/com.tau.hub.plist +48 -0
  23. tau_core/hub/templates/tau-hub.service +30 -0
  24. tau_core/hub/units.py +100 -0
  25. tau_core/i18n.py +366 -0
  26. tau_core/logs.py +88 -0
  27. tau_core/models.py +265 -0
  28. tau_core/persona.py +355 -0
  29. tau_core/plugins.py +105 -0
  30. tau_core/registry.py +385 -0
  31. tau_core/sessions/__init__.py +52 -0
  32. tau_core/sessions/base.py +77 -0
  33. tau_core/sessions/file.py +400 -0
  34. tau_core/sessions/memory.py +180 -0
  35. tau_core/status.py +233 -0
  36. tau_core/templates/dotenv.example +22 -0
  37. tau_core/templates/models.toml +14 -0
  38. tau_core/templates/persona.md +46 -0
  39. tau_core/templates/tau.toml +64 -0
  40. tau_core/templates/user.example.md +13 -0
  41. tau_core/testing.py +258 -0
  42. tau_core/tiers.py +159 -0
  43. tau_core-0.2.0.dist-info/METADATA +615 -0
  44. tau_core-0.2.0.dist-info/RECORD +47 -0
  45. tau_core-0.2.0.dist-info/WHEEL +4 -0
  46. tau_core-0.2.0.dist-info/entry_points.txt +12 -0
  47. tau_core-0.2.0.dist-info/licenses/LICENSE +21 -0
tau_core/__init__.py ADDED
@@ -0,0 +1,153 @@
1
+ """tau-core: the agent core of tau.
2
+
3
+ Public API (other tau packages import only these names and ``tau_core.testing``)::
4
+
5
+ Config, ConfigError, MissingCredentials
6
+ build_agent, TauAgent, TurnEvent, TextDelta, ReasoningDelta, ToolUseStarted, ToolProgress,
7
+ ToolFinished, Throttled, Notice, TurnEnd, STOP_REASONS, to_turn_event
8
+ SessionStore, MemorySessionStore, open_session_store, SESSION_BACKENDS,
9
+ register_session_backend
10
+ PROVIDERS, register_provider
11
+ ContextSource, PersonaLoader
12
+ HubService
13
+ discover_tools
14
+ EventBus, AgentEvent
15
+ Approver, Decision, ApprovalRequest, TerminalApprover, TierGate, TierHook, Exemption
16
+ tau_tool, Tier, ToolCatalog, UntieredToolError, tier_of, effect_of
17
+ t, Language, LANGUAGES, SlashCommand, SLASH_COMMANDS, resolve_command, command_hint
18
+ configure_logging, reset_logging
19
+ CompactionError, CompactionCancelled, summarize, seed_messages, compaction_title,
20
+ record_compaction, SessionContextMismatch
21
+ ModelInfo, describe_model, status_lines, status_report, role_lines, stored_role
22
+ """
23
+
24
+ from __future__ import annotations
25
+
26
+ from tau_core._version import __version__
27
+ from tau_core.agent import (
28
+ STOP_REASONS,
29
+ Notice,
30
+ ReasoningDelta,
31
+ SessionContextMismatch,
32
+ TauAgent,
33
+ TextDelta,
34
+ Throttled,
35
+ ToolFinished,
36
+ ToolProgress,
37
+ ToolUseStarted,
38
+ TurnEnd,
39
+ TurnEvent,
40
+ build_agent,
41
+ to_turn_event,
42
+ )
43
+ from tau_core.approval import (
44
+ ApprovalRequest,
45
+ Approver,
46
+ Decision,
47
+ Exemption,
48
+ TerminalApprover,
49
+ TierGate,
50
+ TierHook,
51
+ )
52
+ from tau_core.commands import SLASH_COMMANDS, SlashCommand, command_hint, resolve_command
53
+ from tau_core.compaction import (
54
+ CompactionCancelled,
55
+ CompactionError,
56
+ compaction_title,
57
+ record_compaction,
58
+ seed_messages,
59
+ summarize,
60
+ )
61
+ from tau_core.config import Config, ConfigError, UiConfig
62
+ from tau_core.events import AgentEvent, EventBus
63
+ from tau_core.hub.daemon import HubService
64
+ from tau_core.i18n import LANGUAGES, Language, t
65
+ from tau_core.logs import configure_logging, reset_logging
66
+ from tau_core.models import PROVIDERS, MissingCredentials
67
+ from tau_core.persona import ContextSource, PersonaLoader
68
+ from tau_core.plugins import discover_tools
69
+ from tau_core.registry import register_provider, register_session_backend
70
+ from tau_core.sessions import (
71
+ SESSION_BACKENDS,
72
+ MemorySessionStore,
73
+ SessionStore,
74
+ open_session_store,
75
+ )
76
+ from tau_core.status import (
77
+ ModelInfo,
78
+ describe_model,
79
+ role_lines,
80
+ status_lines,
81
+ status_report,
82
+ stored_role,
83
+ )
84
+ from tau_core.tiers import Tier, ToolCatalog, UntieredToolError, effect_of, tau_tool, tier_of
85
+
86
+ __all__ = [
87
+ "LANGUAGES",
88
+ "PROVIDERS",
89
+ "SESSION_BACKENDS",
90
+ "SLASH_COMMANDS",
91
+ "STOP_REASONS",
92
+ "AgentEvent",
93
+ "ApprovalRequest",
94
+ "Approver",
95
+ "CompactionCancelled",
96
+ "CompactionError",
97
+ "Config",
98
+ "ConfigError",
99
+ "ContextSource",
100
+ "Decision",
101
+ "EventBus",
102
+ "Exemption",
103
+ "HubService",
104
+ "Language",
105
+ "MemorySessionStore",
106
+ "MissingCredentials",
107
+ "ModelInfo",
108
+ "Notice",
109
+ "PersonaLoader",
110
+ "ReasoningDelta",
111
+ "SessionContextMismatch",
112
+ "SessionStore",
113
+ "SlashCommand",
114
+ "TauAgent",
115
+ "TerminalApprover",
116
+ "TextDelta",
117
+ "Throttled",
118
+ "Tier",
119
+ "TierGate",
120
+ "TierHook",
121
+ "ToolCatalog",
122
+ "ToolFinished",
123
+ "ToolProgress",
124
+ "ToolUseStarted",
125
+ "TurnEnd",
126
+ "TurnEvent",
127
+ "UiConfig",
128
+ "UntieredToolError",
129
+ "__version__",
130
+ "build_agent",
131
+ "command_hint",
132
+ "compaction_title",
133
+ "configure_logging",
134
+ "describe_model",
135
+ "discover_tools",
136
+ "effect_of",
137
+ "open_session_store",
138
+ "record_compaction",
139
+ "register_provider",
140
+ "register_session_backend",
141
+ "reset_logging",
142
+ "resolve_command",
143
+ "role_lines",
144
+ "seed_messages",
145
+ "status_lines",
146
+ "status_report",
147
+ "stored_role",
148
+ "summarize",
149
+ "t",
150
+ "tau_tool",
151
+ "tier_of",
152
+ "to_turn_event",
153
+ ]
tau_core/__main__.py ADDED
@@ -0,0 +1,6 @@
1
+ """``python -m tau_core`` → the ``tau`` CLI."""
2
+
3
+ from tau_core.cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()
tau_core/_version.py ADDED
@@ -0,0 +1,10 @@
1
+ """The installed tau-core version, importable without the package's public API."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib.metadata import PackageNotFoundError, version
6
+
7
+ try:
8
+ __version__ = version("tau-core")
9
+ except PackageNotFoundError: # running from a source tree without installation
10
+ __version__ = "0.0.0"