mycode-sdk 0.5.1__tar.gz → 0.5.2__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.
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/PKG-INFO +2 -4
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/README.md +1 -3
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/pyproject.toml +1 -1
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/agent.py +4 -2
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/.gitignore +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/LICENSE +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/__init__.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/messages.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/models.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/models_catalog.json +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/providers/__init__.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/providers/anthropic_like.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/providers/base.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/providers/gemini.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/providers/openai_chat.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/providers/openai_responses.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/py.typed +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/session.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/tools.py +0 -0
- {mycode_sdk-0.5.1 → mycode_sdk-0.5.2}/src/mycode/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mycode-sdk
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Multi-turn tool-calling agent runtime for embedding the mycode agent loop.
|
|
5
5
|
Project-URL: Homepage, https://github.com/legibet/mycode
|
|
6
6
|
Project-URL: Repository, https://github.com/legibet/mycode
|
|
@@ -47,7 +47,6 @@ async def main() -> None:
|
|
|
47
47
|
agent = Agent(
|
|
48
48
|
model="claude-sonnet-4-6",
|
|
49
49
|
api_key="YOUR_API_KEY",
|
|
50
|
-
cwd=".",
|
|
51
50
|
tools=[read_tool, bash_tool],
|
|
52
51
|
)
|
|
53
52
|
|
|
@@ -59,7 +58,7 @@ async def main() -> None:
|
|
|
59
58
|
asyncio.run(main())
|
|
60
59
|
```
|
|
61
60
|
|
|
62
|
-
`Agent(...)` infers the provider from the model id. No tools are registered unless you pass `tools=[...]`, and nothing is persisted unless you pass `session_dir=`.
|
|
61
|
+
`Agent(...)` infers the provider from the model id and defaults `cwd` to the current working directory. No tools are registered unless you pass `tools=[...]`, and nothing is persisted unless you pass `session_dir=`.
|
|
63
62
|
|
|
64
63
|
For a synchronous call, use `run()` — it collects the stream into a `RunResult`:
|
|
65
64
|
|
|
@@ -101,7 +100,6 @@ def summarize_file(ctx: ToolContext, path: str) -> str:
|
|
|
101
100
|
agent = Agent(
|
|
102
101
|
model="claude-sonnet-4-6",
|
|
103
102
|
api_key="YOUR_API_KEY",
|
|
104
|
-
cwd=".",
|
|
105
103
|
tools=[read_tool, summarize_file],
|
|
106
104
|
)
|
|
107
105
|
```
|
|
@@ -22,7 +22,6 @@ async def main() -> None:
|
|
|
22
22
|
agent = Agent(
|
|
23
23
|
model="claude-sonnet-4-6",
|
|
24
24
|
api_key="YOUR_API_KEY",
|
|
25
|
-
cwd=".",
|
|
26
25
|
tools=[read_tool, bash_tool],
|
|
27
26
|
)
|
|
28
27
|
|
|
@@ -34,7 +33,7 @@ async def main() -> None:
|
|
|
34
33
|
asyncio.run(main())
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
`Agent(...)` infers the provider from the model id. No tools are registered unless you pass `tools=[...]`, and nothing is persisted unless you pass `session_dir=`.
|
|
36
|
+
`Agent(...)` infers the provider from the model id and defaults `cwd` to the current working directory. No tools are registered unless you pass `tools=[...]`, and nothing is persisted unless you pass `session_dir=`.
|
|
38
37
|
|
|
39
38
|
For a synchronous call, use `run()` — it collects the stream into a `RunResult`:
|
|
40
39
|
|
|
@@ -76,7 +75,6 @@ def summarize_file(ctx: ToolContext, path: str) -> str:
|
|
|
76
75
|
agent = Agent(
|
|
77
76
|
model="claude-sonnet-4-6",
|
|
78
77
|
api_key="YOUR_API_KEY",
|
|
79
|
-
cwd=".",
|
|
80
78
|
tools=[read_tool, summarize_file],
|
|
81
79
|
)
|
|
82
80
|
```
|
|
@@ -9,6 +9,7 @@ from __future__ import annotations
|
|
|
9
9
|
|
|
10
10
|
import asyncio
|
|
11
11
|
import logging
|
|
12
|
+
import os
|
|
12
13
|
import tempfile
|
|
13
14
|
from collections.abc import AsyncIterator, Awaitable, Callable, Sequence
|
|
14
15
|
from dataclasses import dataclass, field
|
|
@@ -65,7 +66,7 @@ class Agent:
|
|
|
65
66
|
self,
|
|
66
67
|
*,
|
|
67
68
|
model: str,
|
|
68
|
-
cwd: str,
|
|
69
|
+
cwd: str | None = None,
|
|
69
70
|
provider: str | None = None,
|
|
70
71
|
session_dir: Path | None = None,
|
|
71
72
|
session_id: str | None = None,
|
|
@@ -91,7 +92,8 @@ class Agent:
|
|
|
91
92
|
provider = inferred
|
|
92
93
|
self.provider = provider
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
resolved_cwd = cwd if cwd is not None else os.getcwd()
|
|
96
|
+
self.cwd = str(Path(resolved_cwd).resolve(strict=False))
|
|
95
97
|
|
|
96
98
|
# Persistence is opt-in: a store is only created when ``session_dir``
|
|
97
99
|
# is supplied. ``session_id`` is always populated (uuid when absent)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|