langgraph-runtime-inmem 0.15.0__tar.gz → 0.16.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.
Files changed (16) hide show
  1. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/PKG-INFO +1 -1
  2. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/__init__.py +1 -1
  3. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/database.py +3 -1
  4. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/ops.py +24 -39
  5. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/.gitignore +0 -0
  6. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/Makefile +0 -0
  7. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/README.md +0 -0
  8. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/checkpoint.py +0 -0
  9. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/inmem_stream.py +0 -0
  10. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/lifespan.py +0 -0
  11. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/metrics.py +0 -0
  12. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/queue.py +0 -0
  13. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/retry.py +0 -0
  14. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/langgraph_runtime_inmem/store.py +0 -0
  15. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/pyproject.toml +0 -0
  16. {langgraph_runtime_inmem-0.15.0 → langgraph_runtime_inmem-0.16.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-runtime-inmem
3
- Version: 0.15.0
3
+ Version: 0.16.0
4
4
  Summary: Inmem implementation for the LangGraph API server.
5
5
  Author-email: Will Fu-Hinthorn <will@langchain.dev>
6
6
  License: Elastic-2.0
@@ -9,7 +9,7 @@ from langgraph_runtime_inmem import (
9
9
  store,
10
10
  )
11
11
 
12
- __version__ = "0.15.0"
12
+ __version__ = "0.16.0"
13
13
  __all__ = [
14
14
  "ops",
15
15
  "database",
@@ -142,7 +142,9 @@ class InMemConnectionProto:
142
142
 
143
143
 
144
144
  @asynccontextmanager
145
- async def connect(*, __test__: bool = False) -> AsyncIterator["AsyncConnectionProto"]:
145
+ async def connect(
146
+ *, supports_core_api: bool = False, __test__: bool = False
147
+ ) -> AsyncIterator["AsyncConnectionProto"]:
146
148
  yield InMemConnectionProto()
147
149
 
148
150
 
@@ -2120,7 +2120,6 @@ class Runs(Authenticated):
2120
2120
  ctx: Auth.types.BaseAuthContext | None = None,
2121
2121
  ) -> AsyncIterator[Run]:
2122
2122
  """Create a run."""
2123
- from langgraph_api.config import FF_RICH_THREADS
2124
2123
  from langgraph_api.schema import Run, Thread
2125
2124
 
2126
2125
  assistant_id = _ensure_uuid(assistant_id)
@@ -2167,49 +2166,35 @@ class Runs(Authenticated):
2167
2166
  # Create new thread
2168
2167
  if thread_id is None:
2169
2168
  thread_id = uuid4()
2170
- if FF_RICH_THREADS:
2171
- thread = Thread(
2172
- thread_id=thread_id,
2173
- status="busy",
2174
- metadata={
2175
- "graph_id": assistant["graph_id"],
2176
- "assistant_id": str(assistant_id),
2177
- **(config.get("metadata") or {}),
2178
- **metadata,
2179
- },
2180
- config=Runs._merge_jsonb(
2181
- assistant["config"],
2182
- config,
2183
- {
2184
- "configurable": Runs._merge_jsonb(
2185
- Runs._get_configurable(assistant["config"]),
2186
- )
2187
- },
2188
- ),
2189
- created_at=datetime.now(UTC),
2190
- updated_at=datetime.now(UTC),
2191
- values=b"",
2192
- )
2193
- else:
2194
- thread = Thread(
2195
- thread_id=thread_id,
2196
- status="idle",
2197
- metadata={
2198
- "graph_id": assistant["graph_id"],
2199
- "assistant_id": str(assistant_id),
2200
- **(config.get("metadata") or {}),
2201
- **metadata,
2169
+
2170
+ thread = Thread(
2171
+ thread_id=thread_id,
2172
+ status="busy",
2173
+ metadata={
2174
+ "graph_id": assistant["graph_id"],
2175
+ "assistant_id": str(assistant_id),
2176
+ **(config.get("metadata") or {}),
2177
+ **metadata,
2178
+ },
2179
+ config=Runs._merge_jsonb(
2180
+ assistant["config"],
2181
+ config,
2182
+ {
2183
+ "configurable": Runs._merge_jsonb(
2184
+ Runs._get_configurable(assistant["config"]),
2185
+ )
2202
2186
  },
2203
- config={},
2204
- created_at=datetime.now(UTC),
2205
- updated_at=datetime.now(UTC),
2206
- values=b"",
2207
- )
2187
+ ),
2188
+ created_at=datetime.now(UTC),
2189
+ updated_at=datetime.now(UTC),
2190
+ values=b"",
2191
+ )
2192
+
2208
2193
  await logger.ainfo("Creating thread", thread_id=thread_id)
2209
2194
  conn.store["threads"].append(thread)
2210
2195
  elif existing_thread:
2211
2196
  # Update existing thread
2212
- if FF_RICH_THREADS and existing_thread["status"] != "busy":
2197
+ if existing_thread["status"] != "busy":
2213
2198
  existing_thread["status"] = "busy"
2214
2199
  existing_thread["metadata"] = Runs._merge_jsonb(
2215
2200
  existing_thread["metadata"],