Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,17 @@ Maps names to inodes (directory entries).

```sql
CREATE TABLE fs_dentry (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
parent_ino INTEGER NOT NULL,
ino INTEGER NOT NULL,
UNIQUE(parent_ino, name)
PRIMARY KEY(parent_ino, name)
)

CREATE INDEX idx_fs_dentry_parent ON fs_dentry(parent_ino, name)
```

**Fields:**

- `id` - Internal entry ID
- `name` - Basename (filename or directory name)
- `parent_ino` - Parent directory inode number
- `ino` - Inode this entry points to
Expand Down
3 changes: 1 addition & 2 deletions sdk/python/agentfs_sdk/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,10 @@ async def _initialize(self) -> None:
);

CREATE TABLE IF NOT EXISTS fs_dentry (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
parent_ino INTEGER NOT NULL,
ino INTEGER NOT NULL,
UNIQUE(parent_ino, name)
PRIMARY KEY(parent_ino, name)
);

CREATE INDEX IF NOT EXISTS idx_fs_dentry_parent
Expand Down
3 changes: 1 addition & 2 deletions sdk/rust/src/filesystem/agentfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,10 @@ impl AgentFS {
// Create directory entry table
conn.execute(
"CREATE TABLE IF NOT EXISTS fs_dentry (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
parent_ino INTEGER NOT NULL,
ino INTEGER NOT NULL,
UNIQUE(parent_ino, name)
PRIMARY KEY(parent_ino, name)
)",
(),
)
Expand Down
3 changes: 1 addition & 2 deletions sdk/typescript/src/filesystem/agentfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,10 @@ export class AgentFS implements FileSystem {

await this.db.exec(`
CREATE TABLE IF NOT EXISTS fs_dentry (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
parent_ino INTEGER NOT NULL,
ino INTEGER NOT NULL,
UNIQUE(parent_ino, name)
PRIMARY KEY(parent_ino, name)
)
`);

Expand Down
3 changes: 1 addition & 2 deletions sdk/typescript/src/integrations/cloudflare/agentfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,10 @@ export class AgentFS implements FileSystem {

this.storage.sql.exec(`
CREATE TABLE IF NOT EXISTS fs_dentry (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
parent_ino INTEGER NOT NULL,
ino INTEGER NOT NULL,
UNIQUE(parent_ino, name)
PRIMARY KEY(parent_ino, name)
)
`);

Expand Down