amfs-http-server 0.3.38__tar.gz → 0.3.40__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,11 +1,11 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: amfs-http-server
3
- Version: 0.3.38
3
+ Version: 0.3.40
4
4
  Summary: AMFS HTTP/REST API server with SSE support
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.11
7
- Requires-Dist: amfs-core>=0.3.34
8
- Requires-Dist: amfs>=0.5.22
7
+ Requires-Dist: amfs-core>=0.3.37
8
+ Requires-Dist: amfs>=0.5.27
9
9
  Requires-Dist: fastapi>=0.115
10
10
  Requires-Dist: httpx>=0.27
11
11
  Requires-Dist: sse-starlette>=2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "amfs-http-server"
3
- version = "0.3.38"
3
+ version = "0.3.40"
4
4
  description = "AMFS HTTP/REST API server with SSE support"
5
5
  requires-python = ">=3.11"
6
6
  license = "Apache-2.0"
@@ -13,7 +13,7 @@ dependencies = [
13
13
  # this tree is what test_dependency_floors forbids.
14
14
  # 0.5.18 for AgentMemory.as_agent, which the agent detail page calls to list
15
15
  # an agent's entries as that agent rather than as the server.
16
- "amfs>=0.5.22",
16
+ "amfs>=0.5.27",
17
17
  # 0.3.23 is real in the silent way: the write path calls
18
18
  # adapter.scope_counts(), which is a default on AdapterABC from 0.3.23. On an
19
19
  # older core the adapters that do not override it — filesystem, S3 — have no
@@ -27,7 +27,7 @@ dependencies = [
27
27
  # unexpected keyword, _scope_block swallows it, and the block disappears —
28
28
  # while an adapter that ignored the argument instead would name another
29
29
  # agent's private keys. Either way the floor is what makes the rule real.
30
- "amfs-core>=0.3.34",
30
+ "amfs-core>=0.3.37",
31
31
  "fastapi>=0.115",
32
32
  "uvicorn[standard]>=0.32",
33
33
  "sse-starlette>=2.0",
@@ -93,7 +93,11 @@ class SearchRequest(BaseModel):
93
93
  pattern_ref: str | None = None
94
94
  limit: int = 100
95
95
  sort_by: str = "confidence"
96
- branch: str = "main"
96
+ # ``None`` rather than ``"main"`` so the server can tell a caller that
97
+ # named no branch from one that asked for main: the former may be routed
98
+ # onto a canary branch by the SaaS layer (``request.state.memory_branch``),
99
+ # the latter never is. The SDK omits the field when it is main.
100
+ branch: str | None = None
97
101
  depth: int = 3
98
102
  # When True (default) artifacts are demoted to the bottom of results; when
99
103
  # False they are excluded entirely.
@@ -118,7 +122,7 @@ class AggregateRequest(BaseModel):
118
122
  field: str | None = None
119
123
  group_by: str | None = None
120
124
  row_path: str | None = None
121
- branch: str = "main"
125
+ branch: str | None = None # see SearchRequest.branch
122
126
 
123
127
 
124
128
  class RetrieveRequest(BaseModel):
@@ -136,7 +140,7 @@ class RetrieveRequest(BaseModel):
136
140
  semantic_weight: float = 0.5
137
141
  recency_weight: float = 0.3
138
142
  confidence_weight: float = 0.2
139
- branch: str = "main"
143
+ branch: str | None = None # see SearchRequest.branch
140
144
  # When True (default) artifacts (stored source files) are demoted but still
141
145
  # returned; when False they are excluded entirely from results.
142
146
  include_artifacts: bool = True
@@ -178,6 +182,16 @@ class RetrieveRequest(BaseModel):
178
182
  #: breakdown, importance dimensions, integrity fields, long values trimmed).
179
183
  #: Roughly a third of the tokens of the full payload.
180
184
  compact: bool = False
185
+ #: The asking run's environment — ``{"model", "agent_version", "runtime",
186
+ #: "platform"}`` — from the SDK's session or the MCP identity. A procedure
187
+ #: whose ``preconditions`` contradict it is dropped from the hits (it is a
188
+ #: way of doing the task somewhere else) and the priors weight outcomes
189
+ #: recorded under another environment less. Nothing changes when omitted.
190
+ environment: dict[str, str] | None = None
191
+ #: Say ``abstain`` in the recommendation when nothing in scope has been
192
+ #: tried or validated, instead of staying silent. Opt-in; with it a client
193
+ #: can tell "no guidance" from "guidance not requested".
194
+ abstain: bool = False
181
195
 
182
196
 
183
197
  class ContextRequest(BaseModel):