agentknit 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.
agentknit/__init__.py ADDED
@@ -0,0 +1,136 @@
1
+ """agentknit — spec-driven coding agent framework for any OpenAI-compatible endpoint."""
2
+
3
+ __version__ = "0.1.0"
4
+
5
+ from .exceptions import (
6
+ AgentProbeError,
7
+ AgentSpecDisabledError,
8
+ AgentSpecInvalidError,
9
+ PricingLimitExceededError,
10
+ AuthenticationError,
11
+ CacheProofError,
12
+ )
13
+
14
+ from ._core import (
15
+ main,
16
+ run,
17
+ validate_schema,
18
+ create_client,
19
+ run_task,
20
+ run_repl,
21
+ run_async_repl,
22
+ SessionResult,
23
+ CancelToken,
24
+ EventCallback,
25
+ _default_event_handler,
26
+ enable_osc8_hyperlinks,
27
+ subscribe,
28
+ unsubscribe,
29
+ on,
30
+ run_turn,
31
+ init_session,
32
+ dispatch,
33
+ load_specification,
34
+ check_and_display_pricing,
35
+ extract_inline_calls,
36
+ schema_props,
37
+ fmt_usage,
38
+ fmt_call,
39
+ fmt_result,
40
+ safe_model_name,
41
+ inline_system_prompt,
42
+ FatalToolDispatchError,
43
+ LOG_BASE,
44
+ DEFAULT_ENDPOINT,
45
+ DEFAULT_MAX_TOKENS,
46
+ DEFAULT_COMPACTION_TRIGGER_TOKENS,
47
+ DEFAULT_COMPACTION_TARGET_TOKENS,
48
+ DEFAULT_COMPACTION_KEEP_LAST_TURNS,
49
+ _parse_run_uri,
50
+ _expand_aliases,
51
+ _open_log,
52
+ _save_messages_snapshot,
53
+ _load_messages_snapshot,
54
+ _find_snapshot_in_other_models,
55
+ _handle_tool_call,
56
+ _complete,
57
+ compact_session,
58
+ _compact_session,
59
+ _maybe_compact,
60
+ )
61
+
62
+ from .tool import (
63
+ Tool,
64
+ build_tool_spec,
65
+ register_tools_in_library,
66
+ )
67
+
68
+ from .sandbox import (
69
+ ToolExecutor,
70
+ ToolSessionContext,
71
+ LocalToolExecutor,
72
+ SandboxPolicy,
73
+ BubblewrapToolExecutor,
74
+ )
75
+
76
+ from ._tool_spec import (
77
+ parse_tool_spec_from_docstring,
78
+ extract_tool_specs_from_module,
79
+ )
80
+
81
+ from .tool_library import (
82
+ t_execute_async,
83
+ t_query_exec,
84
+ ASYNC_EXEC_DIR,
85
+ ASYNC_FAST_THRESHOLD_S,
86
+ ASYNC_INLINE_MAX_BYTES,
87
+ async_completion_queue,
88
+ enable_rtk_rewrite,
89
+ )
90
+
91
+ from .slash_commands import (
92
+ SlashCommand,
93
+ SlashCommandRegistry,
94
+ REGISTRY as slash_registry,
95
+ t_slash_command,
96
+ slash_tool_ctx,
97
+ SLASH_COMMAND_TOOL,
98
+ )
99
+
100
+ __all__ = [
101
+ "parse_tool_spec_from_docstring",
102
+ "extract_tool_specs_from_module",
103
+ "AgentProbeError", "AgentSpecDisabledError", "AgentSpecInvalidError",
104
+ "PricingLimitExceededError", "AuthenticationError", "CacheProofError",
105
+ "main", "run",
106
+ "validate_schema", "create_client", "run_task", "run_repl", "run_async_repl",
107
+ "SessionResult", "CancelToken", "EventCallback", "_default_event_handler",
108
+ "enable_osc8_hyperlinks",
109
+ "subscribe", "unsubscribe", "on",
110
+ "run_turn", "init_session", "dispatch", "load_specification",
111
+ "check_and_display_pricing", "extract_inline_calls", "schema_props",
112
+ "fmt_usage", "fmt_call", "fmt_result", "safe_model_name",
113
+ "inline_system_prompt", "FatalToolDispatchError",
114
+ "LOG_BASE", "DEFAULT_ENDPOINT", "DEFAULT_MAX_TOKENS",
115
+ "DEFAULT_COMPACTION_TRIGGER_TOKENS", "DEFAULT_COMPACTION_TARGET_TOKENS",
116
+ "DEFAULT_COMPACTION_KEEP_LAST_TURNS",
117
+ "_parse_run_uri", "_expand_aliases", "_open_log",
118
+ "_save_messages_snapshot", "_load_messages_snapshot",
119
+ "_find_snapshot_in_other_models", "_handle_tool_call", "_complete",
120
+ "compact_session", "_compact_session", "_maybe_compact",
121
+ "Tool",
122
+ "build_tool_spec",
123
+ "register_tools_in_library",
124
+ "ToolExecutor", "ToolSessionContext", "LocalToolExecutor",
125
+ "SandboxPolicy", "BubblewrapToolExecutor",
126
+ "SlashCommand",
127
+ "SlashCommandRegistry",
128
+ "slash_registry",
129
+ "t_slash_command",
130
+ "slash_tool_ctx",
131
+ "SLASH_COMMAND_TOOL",
132
+ # async shell tools
133
+ "t_execute_async", "t_query_exec", "async_completion_queue",
134
+ "ASYNC_EXEC_DIR", "ASYNC_FAST_THRESHOLD_S", "ASYNC_INLINE_MAX_BYTES",
135
+ "enable_rtk_rewrite",
136
+ ]