agentfs-sdk 0.4.0rc1__tar.gz → 0.4.0rc3__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.
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/PKG-INFO +4 -2
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk/__init__.py +1 -1
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk/filesystem.py +23 -13
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk.egg-info/PKG-INFO +4 -2
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/pyproject.toml +5 -3
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/MANIFEST.in +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/README.md +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk/agentfs.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk/kvstore.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk/toolcalls.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk.egg-info/SOURCES.txt +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk.egg-info/dependency_links.txt +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk.egg-info/requires.txt +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/agentfs_sdk.egg-info/top_level.txt +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/setup.cfg +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/tests/test_agentfs.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/tests/test_basic.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/tests/test_filesystem.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/tests/test_kvstore.py +0 -0
- {agentfs_sdk-0.4.0rc1 → agentfs_sdk-0.4.0rc3}/tests/test_toolcalls.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentfs-sdk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.0rc3
|
|
4
4
|
Summary: AgentFS Python SDK - A filesystem and key-value store for AI agents
|
|
5
5
|
Author: Turso
|
|
6
6
|
License: MIT
|
|
@@ -16,9 +16,11 @@ Classifier: Operating System :: POSIX :: Linux
|
|
|
16
16
|
Classifier: Operating System :: Microsoft :: Windows
|
|
17
17
|
Classifier: Operating System :: MacOS
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
22
24
|
Description-Content-Type: text/markdown
|
|
23
25
|
Requires-Dist: pyturso==0.4.0rc17
|
|
24
26
|
|
|
@@ -101,6 +101,7 @@ class Filesystem:
|
|
|
101
101
|
CREATE TABLE IF NOT EXISTS fs_inode (
|
|
102
102
|
ino INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
103
103
|
mode INTEGER NOT NULL,
|
|
104
|
+
nlink INTEGER NOT NULL DEFAULT 0,
|
|
104
105
|
uid INTEGER NOT NULL DEFAULT 0,
|
|
105
106
|
gid INTEGER NOT NULL DEFAULT 0,
|
|
106
107
|
size INTEGER NOT NULL DEFAULT 0,
|
|
@@ -161,8 +162,8 @@ class Filesystem:
|
|
|
161
162
|
now = int(time.time())
|
|
162
163
|
await self._db.execute(
|
|
163
164
|
"""
|
|
164
|
-
INSERT INTO fs_inode (ino, mode, uid, gid, size, atime, mtime, ctime)
|
|
165
|
-
VALUES (?, ?, 0, 0, 0, ?, ?, ?)
|
|
165
|
+
INSERT INTO fs_inode (ino, mode, nlink, uid, gid, size, atime, mtime, ctime)
|
|
166
|
+
VALUES (?, ?, 1, 0, 0, 0, ?, ?, ?)
|
|
166
167
|
""",
|
|
167
168
|
(self._root_ino, DEFAULT_DIR_MODE, now, now, now),
|
|
168
169
|
)
|
|
@@ -266,6 +267,11 @@ class Filesystem:
|
|
|
266
267
|
""",
|
|
267
268
|
(name, parent_ino, ino),
|
|
268
269
|
)
|
|
270
|
+
# Increment link count
|
|
271
|
+
await self._db.execute(
|
|
272
|
+
"UPDATE fs_inode SET nlink = nlink + 1 WHERE ino = ?",
|
|
273
|
+
(ino,),
|
|
274
|
+
)
|
|
269
275
|
await self._db.commit()
|
|
270
276
|
|
|
271
277
|
async def _ensure_parent_dirs(self, path: str) -> None:
|
|
@@ -301,7 +307,7 @@ class Filesystem:
|
|
|
301
307
|
|
|
302
308
|
async def _get_link_count(self, ino: int) -> int:
|
|
303
309
|
"""Get link count for an inode"""
|
|
304
|
-
cursor = await self._db.execute("SELECT
|
|
310
|
+
cursor = await self._db.execute("SELECT nlink FROM fs_inode WHERE ino = ?", (ino,))
|
|
305
311
|
result = await cursor.fetchone()
|
|
306
312
|
return result[0] if result else 0
|
|
307
313
|
|
|
@@ -477,6 +483,12 @@ class Filesystem:
|
|
|
477
483
|
(parent_ino, name),
|
|
478
484
|
)
|
|
479
485
|
|
|
486
|
+
# Decrement link count
|
|
487
|
+
await self._db.execute(
|
|
488
|
+
"UPDATE fs_inode SET nlink = nlink - 1 WHERE ino = ?",
|
|
489
|
+
(ino,),
|
|
490
|
+
)
|
|
491
|
+
|
|
480
492
|
# Check if this was the last link to the inode
|
|
481
493
|
link_count = await self._get_link_count(ino)
|
|
482
494
|
if link_count == 0:
|
|
@@ -508,7 +520,7 @@ class Filesystem:
|
|
|
508
520
|
|
|
509
521
|
cursor = await self._db.execute(
|
|
510
522
|
"""
|
|
511
|
-
SELECT ino, mode, uid, gid, size, atime, mtime, ctime
|
|
523
|
+
SELECT ino, mode, nlink, uid, gid, size, atime, mtime, ctime
|
|
512
524
|
FROM fs_inode
|
|
513
525
|
WHERE ino = ?
|
|
514
526
|
""",
|
|
@@ -519,16 +531,14 @@ class Filesystem:
|
|
|
519
531
|
if not row:
|
|
520
532
|
raise ValueError(f"Inode not found: {ino}")
|
|
521
533
|
|
|
522
|
-
nlink = await self._get_link_count(ino)
|
|
523
|
-
|
|
524
534
|
return Stats(
|
|
525
535
|
ino=row[0],
|
|
526
536
|
mode=row[1],
|
|
527
|
-
nlink=
|
|
528
|
-
uid=row[
|
|
529
|
-
gid=row[
|
|
530
|
-
size=row[
|
|
531
|
-
atime=row[
|
|
532
|
-
mtime=row[
|
|
533
|
-
ctime=row[
|
|
537
|
+
nlink=row[2],
|
|
538
|
+
uid=row[3],
|
|
539
|
+
gid=row[4],
|
|
540
|
+
size=row[5],
|
|
541
|
+
atime=row[6],
|
|
542
|
+
mtime=row[7],
|
|
543
|
+
ctime=row[8],
|
|
534
544
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentfs-sdk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.0rc3
|
|
4
4
|
Summary: AgentFS Python SDK - A filesystem and key-value store for AI agents
|
|
5
5
|
Author: Turso
|
|
6
6
|
License: MIT
|
|
@@ -16,9 +16,11 @@ Classifier: Operating System :: POSIX :: Linux
|
|
|
16
16
|
Classifier: Operating System :: Microsoft :: Windows
|
|
17
17
|
Classifier: Operating System :: MacOS
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
22
24
|
Description-Content-Type: text/markdown
|
|
23
25
|
Requires-Dist: pyturso==0.4.0rc17
|
|
24
26
|
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agentfs-sdk"
|
|
7
|
-
version = "0.4.0-pre.
|
|
7
|
+
version = "0.4.0-pre.3"
|
|
8
8
|
description = "AgentFS Python SDK - A filesystem and key-value store for AI agents"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
11
|
license = {text = "MIT"}
|
|
12
12
|
keywords = ["ai", "agent", "turso", "sqlite", "key-value", "filesystem"]
|
|
13
13
|
authors = [
|
|
@@ -21,6 +21,8 @@ classifiers = [
|
|
|
21
21
|
'Operating System :: Microsoft :: Windows',
|
|
22
22
|
'Operating System :: MacOS',
|
|
23
23
|
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
24
26
|
"Programming Language :: Python :: 3.12",
|
|
25
27
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
28
|
]
|
|
@@ -48,7 +50,7 @@ include = ["agentfs_sdk*"]
|
|
|
48
50
|
|
|
49
51
|
[tool.ruff]
|
|
50
52
|
line-length = 100
|
|
51
|
-
target-version = "
|
|
53
|
+
target-version = "py310"
|
|
52
54
|
|
|
53
55
|
[tool.ruff.lint]
|
|
54
56
|
select = ["E", "F", "I"]
|
|
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
|