axio-context-sqlite 0.7.0__tar.gz → 0.9.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: axio-context-sqlite
3
- Version: 0.7.0
3
+ Version: 0.9.0
4
4
  Summary: SQLite-backed context store for Axio
5
5
  Project-URL: Homepage, https://github.com/mosquito/axio-agent
6
6
  Project-URL: Repository, https://github.com/mosquito/axio-agent
@@ -48,8 +48,8 @@ Create a context store bound to one session.
48
48
 
49
49
  | Parameter | Type | Default | Description |
50
50
  |-----------|------|---------|-------------|
51
- | `conn` | `aiosqlite.Connection` | | Open database connection (from `connect()`) |
52
- | `session_id` | `str` | | Unique identifier for this conversation session |
51
+ | `conn` | `aiosqlite.Connection` | - | Open database connection (from `connect()`) |
52
+ | `session_id` | `str` | - | Unique identifier for this conversation session |
53
53
  | `project` | `str \| None` | `str(Path.cwd().resolve())` | Logical project scope used to group and list sessions. Defaults to the current working directory. |
54
54
  | `db_name` | `str` | `"axio_context"` | Prefix used for the database table names (`axio_context_messages`, `axio_context_tokens`). |
55
55
 
@@ -87,16 +87,16 @@ the same database file, isolated by `session_id` and `project`.
87
87
  Message content is stored as serialized JSON. Payloads larger than 512 bytes
88
88
  are automatically compressed with gzip (compresslevel 6) and stored
89
89
  base64-encoded with a `gzip:` prefix. Smaller payloads are stored as-is with a
90
- `plain:` prefix. Decompression happens transparently on read callers never
90
+ `plain:` prefix. Decompression happens transparently on read - callers never
91
91
  see the encoded form.
92
92
 
93
93
  #### SQLite performance settings
94
94
 
95
95
  Every connection opened by `connect()` is configured with:
96
96
 
97
- - `PRAGMA journal_mode=WAL` enables concurrent readers alongside one writer
98
- - `PRAGMA busy_timeout=5000` waits up to 5 seconds before raising a lock error
99
- - `PRAGMA synchronous=NORMAL` balances durability and write throughput
97
+ - `PRAGMA journal_mode=WAL` - enables concurrent readers alongside one writer
98
+ - `PRAGMA busy_timeout=5000` - waits up to 5 seconds before raising a lock error
99
+ - `PRAGMA synchronous=NORMAL` - balances durability and write throughput
100
100
 
101
101
  ### Agent integration
102
102
 
@@ -166,7 +166,7 @@ to call concurrently from multiple coroutines without an application-level lock.
166
166
 
167
167
  ### Forking
168
168
 
169
- `fork()` copies the current session's messages into a new session useful for
169
+ `fork()` copies the current session's messages into a new session - useful for
170
170
  branching conversations without affecting the original:
171
171
 
172
172
  <!-- name: test_readme_fork -->
@@ -35,8 +35,8 @@ Create a context store bound to one session.
35
35
 
36
36
  | Parameter | Type | Default | Description |
37
37
  |-----------|------|---------|-------------|
38
- | `conn` | `aiosqlite.Connection` | | Open database connection (from `connect()`) |
39
- | `session_id` | `str` | | Unique identifier for this conversation session |
38
+ | `conn` | `aiosqlite.Connection` | - | Open database connection (from `connect()`) |
39
+ | `session_id` | `str` | - | Unique identifier for this conversation session |
40
40
  | `project` | `str \| None` | `str(Path.cwd().resolve())` | Logical project scope used to group and list sessions. Defaults to the current working directory. |
41
41
  | `db_name` | `str` | `"axio_context"` | Prefix used for the database table names (`axio_context_messages`, `axio_context_tokens`). |
42
42
 
@@ -74,16 +74,16 @@ the same database file, isolated by `session_id` and `project`.
74
74
  Message content is stored as serialized JSON. Payloads larger than 512 bytes
75
75
  are automatically compressed with gzip (compresslevel 6) and stored
76
76
  base64-encoded with a `gzip:` prefix. Smaller payloads are stored as-is with a
77
- `plain:` prefix. Decompression happens transparently on read callers never
77
+ `plain:` prefix. Decompression happens transparently on read - callers never
78
78
  see the encoded form.
79
79
 
80
80
  #### SQLite performance settings
81
81
 
82
82
  Every connection opened by `connect()` is configured with:
83
83
 
84
- - `PRAGMA journal_mode=WAL` enables concurrent readers alongside one writer
85
- - `PRAGMA busy_timeout=5000` waits up to 5 seconds before raising a lock error
86
- - `PRAGMA synchronous=NORMAL` balances durability and write throughput
84
+ - `PRAGMA journal_mode=WAL` - enables concurrent readers alongside one writer
85
+ - `PRAGMA busy_timeout=5000` - waits up to 5 seconds before raising a lock error
86
+ - `PRAGMA synchronous=NORMAL` - balances durability and write throughput
87
87
 
88
88
  ### Agent integration
89
89
 
@@ -153,7 +153,7 @@ to call concurrently from multiple coroutines without an application-level lock.
153
153
 
154
154
  ### Forking
155
155
 
156
- `fork()` copies the current session's messages into a new session useful for
156
+ `fork()` copies the current session's messages into a new session - useful for
157
157
  branching conversations without affecting the original:
158
158
 
159
159
  <!-- name: test_readme_fork -->
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "axio-context-sqlite"
3
- version = "0.7.0"
3
+ version = "0.9.0"
4
4
  description = "SQLite-backed context store for Axio"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -35,6 +35,9 @@ select = ["E", "F", "I", "UP"]
35
35
  strict = true
36
36
  python_version = "3.12"
37
37
 
38
+ [tool.uv.sources]
39
+ axio = { workspace = true }
40
+
38
41
  [dependency-groups]
39
42
  dev = [
40
43
  "pytest>=8",
@@ -44,6 +47,3 @@ dev = [
44
47
  "pytest-cov>=7.1.0",
45
48
  "markdown-pytest>=0.6.0",
46
49
  ]
47
-
48
- [tool.uv.sources]
49
- axio = { workspace = true }
@@ -124,7 +124,7 @@ class TestAutoCompactWithSQLite:
124
124
 
125
125
  assert forked.session_id != store.session_id
126
126
 
127
- # append to fork parent unaffected
127
+ # append to fork - parent unaffected
128
128
  await forked.append(_msg(text="extra"))
129
129
  assert len(await store.get_history()) == 6
130
130
  assert len(await forked.get_history()) == 7
@@ -121,7 +121,7 @@ async def test_large_message_compressed_on_disk(db_path: Path) -> None:
121
121
  finally:
122
122
  await c.close()
123
123
 
124
- # Inspect raw bytes on disk should start with gzip:
124
+ # Inspect raw bytes on disk - should start with gzip:
125
125
  async with aiosqlite.connect(str(db_path)) as raw:
126
126
  async with raw.execute("SELECT content FROM axio_context_messages") as cur:
127
127
  row = await cur.fetchone()