thinharness 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.
- thinharness/__init__.py +143 -0
- thinharness/core.py +1044 -0
- thinharness/defaults.py +10 -0
- thinharness/hooks.py +277 -0
- thinharness/output.py +295 -0
- thinharness/providers.py +991 -0
- thinharness/py.typed +1 -0
- thinharness/subagents.py +340 -0
- thinharness/tools/__init__.py +46 -0
- thinharness/tools/base.py +375 -0
- thinharness/tools/filesystem.py +632 -0
- thinharness/tools/jsonl.py +313 -0
- thinharness/tools/mcp.py +391 -0
- thinharness/tools/parallel_llm.py +356 -0
- thinharness/tools/skills.py +259 -0
- thinharness/tracing.py +271 -0
- thinharness-0.1.0.dist-info/METADATA +316 -0
- thinharness-0.1.0.dist-info/RECORD +21 -0
- thinharness-0.1.0.dist-info/WHEEL +5 -0
- thinharness-0.1.0.dist-info/licenses/LICENSE +21 -0
- thinharness-0.1.0.dist-info/top_level.txt +1 -0
thinharness/__init__.py
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"""Public API for the filesystem harness."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError
|
|
4
|
+
from importlib.metadata import version as _metadata_version
|
|
5
|
+
|
|
6
|
+
from .core import Harness, HarnessConfig, HarnessError, HarnessResult, RunUsage, UnexpectedModelBehavior
|
|
7
|
+
from .hooks import (
|
|
8
|
+
AfterSubagentRunContext,
|
|
9
|
+
AfterToolCallContext,
|
|
10
|
+
BeforeSubagentRunContext,
|
|
11
|
+
BeforeToolCallContext,
|
|
12
|
+
Hook,
|
|
13
|
+
HookContext,
|
|
14
|
+
HookEvent,
|
|
15
|
+
HookRegistry,
|
|
16
|
+
LimitReachedContext,
|
|
17
|
+
RunEndContext,
|
|
18
|
+
RunStartContext,
|
|
19
|
+
UserPromptSubmitContext,
|
|
20
|
+
)
|
|
21
|
+
from .output import NativeOutput, OutputSchema, PromptedOutput, TextOutput, ToolStructuredOutput
|
|
22
|
+
from .providers import (
|
|
23
|
+
AnthropicMessagesModel,
|
|
24
|
+
AnthropicProvider,
|
|
25
|
+
Model,
|
|
26
|
+
ModelCapabilities,
|
|
27
|
+
ModelNotice,
|
|
28
|
+
ModelSession,
|
|
29
|
+
ModelSettings,
|
|
30
|
+
ModelToolCall,
|
|
31
|
+
ModelTurn,
|
|
32
|
+
OpenAIProvider,
|
|
33
|
+
OpenAIResponsesModel,
|
|
34
|
+
OpenRouterModel,
|
|
35
|
+
OpenRouterProvider,
|
|
36
|
+
Provider,
|
|
37
|
+
StructuredOutputRequest,
|
|
38
|
+
ToolOutput,
|
|
39
|
+
infer_model,
|
|
40
|
+
parse_model_ref,
|
|
41
|
+
)
|
|
42
|
+
from .subagents import DEFAULT_SUBAGENT_NAME, SubAgentArgs, SubAgentConfig, build_child_harness, create_subagent_tool
|
|
43
|
+
from .tools import (
|
|
44
|
+
FileTools,
|
|
45
|
+
MCPDependencyError,
|
|
46
|
+
MCPError,
|
|
47
|
+
MCPServer,
|
|
48
|
+
MCPServerSSE,
|
|
49
|
+
MCPServerStdio,
|
|
50
|
+
MCPServerStreamableHTTP,
|
|
51
|
+
ModelRetry,
|
|
52
|
+
ParallelLlmArgs,
|
|
53
|
+
ParallelLlmTool,
|
|
54
|
+
PathPolicy,
|
|
55
|
+
PathValidationError,
|
|
56
|
+
Skill,
|
|
57
|
+
SkillRegistry,
|
|
58
|
+
ToolResult,
|
|
59
|
+
ToolSpec,
|
|
60
|
+
builtin_tools,
|
|
61
|
+
call_tool,
|
|
62
|
+
contained_path,
|
|
63
|
+
create_parallel_llm_tool,
|
|
64
|
+
)
|
|
65
|
+
from .tracing import OtlpTracing, TracingOptions, create_otlp_tracing
|
|
66
|
+
|
|
67
|
+
try:
|
|
68
|
+
__version__ = _metadata_version("thinharness")
|
|
69
|
+
except PackageNotFoundError:
|
|
70
|
+
__version__ = "0+unknown"
|
|
71
|
+
|
|
72
|
+
__all__ = [
|
|
73
|
+
"__version__",
|
|
74
|
+
"FileTools",
|
|
75
|
+
"Harness",
|
|
76
|
+
"HarnessConfig",
|
|
77
|
+
"HarnessError",
|
|
78
|
+
"HarnessResult",
|
|
79
|
+
"RunUsage",
|
|
80
|
+
"ModelRetry",
|
|
81
|
+
"UnexpectedModelBehavior",
|
|
82
|
+
"MCPDependencyError",
|
|
83
|
+
"MCPError",
|
|
84
|
+
"MCPServer",
|
|
85
|
+
"MCPServerSSE",
|
|
86
|
+
"MCPServerStdio",
|
|
87
|
+
"MCPServerStreamableHTTP",
|
|
88
|
+
"AfterSubagentRunContext",
|
|
89
|
+
"AfterToolCallContext",
|
|
90
|
+
"BeforeSubagentRunContext",
|
|
91
|
+
"BeforeToolCallContext",
|
|
92
|
+
"Hook",
|
|
93
|
+
"HookContext",
|
|
94
|
+
"HookEvent",
|
|
95
|
+
"HookRegistry",
|
|
96
|
+
"LimitReachedContext",
|
|
97
|
+
"RunEndContext",
|
|
98
|
+
"RunStartContext",
|
|
99
|
+
"UserPromptSubmitContext",
|
|
100
|
+
"AnthropicMessagesModel",
|
|
101
|
+
"AnthropicProvider",
|
|
102
|
+
"Skill",
|
|
103
|
+
"SkillRegistry",
|
|
104
|
+
"SubAgentArgs",
|
|
105
|
+
"SubAgentConfig",
|
|
106
|
+
"DEFAULT_SUBAGENT_NAME",
|
|
107
|
+
"Model",
|
|
108
|
+
"ModelCapabilities",
|
|
109
|
+
"ModelNotice",
|
|
110
|
+
"ModelSettings",
|
|
111
|
+
"ModelSession",
|
|
112
|
+
"ModelToolCall",
|
|
113
|
+
"ModelTurn",
|
|
114
|
+
"OpenAIProvider",
|
|
115
|
+
"OpenAIResponsesModel",
|
|
116
|
+
"OpenRouterModel",
|
|
117
|
+
"OpenRouterProvider",
|
|
118
|
+
"Provider",
|
|
119
|
+
"StructuredOutputRequest",
|
|
120
|
+
"NativeOutput",
|
|
121
|
+
"OutputSchema",
|
|
122
|
+
"PromptedOutput",
|
|
123
|
+
"TextOutput",
|
|
124
|
+
"ToolStructuredOutput",
|
|
125
|
+
"PathPolicy",
|
|
126
|
+
"PathValidationError",
|
|
127
|
+
"ParallelLlmArgs",
|
|
128
|
+
"ParallelLlmTool",
|
|
129
|
+
"ToolResult",
|
|
130
|
+
"ToolSpec",
|
|
131
|
+
"ToolOutput",
|
|
132
|
+
"OtlpTracing",
|
|
133
|
+
"TracingOptions",
|
|
134
|
+
"build_child_harness",
|
|
135
|
+
"builtin_tools",
|
|
136
|
+
"call_tool",
|
|
137
|
+
"contained_path",
|
|
138
|
+
"create_parallel_llm_tool",
|
|
139
|
+
"create_subagent_tool",
|
|
140
|
+
"create_otlp_tracing",
|
|
141
|
+
"infer_model",
|
|
142
|
+
"parse_model_ref",
|
|
143
|
+
]
|