llama-index-postprocessor-needlepath 0.1.3__tar.gz → 0.1.4__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.5
2
2
  Name: llama-index-postprocessor-needlepath
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: llama-index postprocessor needlepath context selection integration
5
5
  Project-URL: Homepage, https://nextmoca.com
6
6
  Author: Next Moca Global, Inc.
@@ -8,7 +8,7 @@ License-Expression: Apache-2.0
8
8
  License-File: LICENSE
9
9
  Requires-Python: <4.0,>=3.10
10
10
  Requires-Dist: llama-index-core<0.15,>=0.13.0
11
- Requires-Dist: needlepath<1.0.0,>=0.2.3
11
+ Requires-Dist: needlepath<1.0.0,>=0.2.5
12
12
  Provides-Extra: dev
13
13
  Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
14
14
  Requires-Dist: pytest>=7; extra == 'dev'
@@ -55,7 +55,7 @@ you have an agent with tool calls, start there instead.
55
55
  | `excerpt` | `True` | Replace kept nodes' text with their excerpt. `False` filters only. |
56
56
  | `update_scores` | `False` | Replace `NodeWithScore.score` with the selection score. |
57
57
  | `preserve_input_order` | `False` | Return kept nodes in retrieval order rather than ranked order. |
58
- | `shadow` | `False` | Measure and report; change nothing. |
58
+ | `shadow` | `False` | Measure and report; apply no ordinary selection. A security delivery (blocked, protected, `sanitized_fallback`, `security_action: quarantine`) is still installed. |
59
59
  | `enabled` | `True` | Kill switch. Needs no credentials when `False`. |
60
60
 
61
61
  Any other keyword is forwarded to the core client (`base_url`, `api_key`,
@@ -38,7 +38,7 @@ you have an agent with tool calls, start there instead.
38
38
  | `excerpt` | `True` | Replace kept nodes' text with their excerpt. `False` filters only. |
39
39
  | `update_scores` | `False` | Replace `NodeWithScore.score` with the selection score. |
40
40
  | `preserve_input_order` | `False` | Return kept nodes in retrieval order rather than ranked order. |
41
- | `shadow` | `False` | Measure and report; change nothing. |
41
+ | `shadow` | `False` | Measure and report; apply no ordinary selection. A security delivery (blocked, protected, `sanitized_fallback`, `security_action: quarantine`) is still installed. |
42
42
  | `enabled` | `True` | Kill switch. Needs no credentials when `False`. |
43
43
 
44
44
  Any other keyword is forwarded to the core client (`base_url`, `api_key`,
@@ -295,11 +295,17 @@ class NeedlepathPostprocessor(BaseNodePostprocessor):
295
295
  self._stats.record(result)
296
296
  # `self.shadow` is belt and braces — the core client already declines a
297
297
  # shadow result — enforced here, at the point of mutation. What shadow
298
- # does not suppress is a protected delivery (a blocked verdict, or a
299
- # selection under workspace protection): shadow never restores
300
- # withheld nodes or a protected original.
298
+ # does not suppress is a security delivery (a blocked verdict, a
299
+ # selection under workspace protection, a sanitized fallback, or a
300
+ # selection the engine quarantined an instruction from): shadow never
301
+ # hands back withheld nodes, a protected original or a removed
302
+ # instruction.
301
303
  blocked = result.reason == Reason.BLOCKED
302
- if not result.applied or result.response is None or (self.shadow and not result.protected):
304
+ if (
305
+ not result.applied
306
+ or result.response is None
307
+ or (self.shadow and not result.security_delivery)
308
+ ):
303
309
  return nodes
304
310
  if blocked:
305
311
  # Workspace policy withheld every record. The verdict is "deliver
@@ -1,3 +1,3 @@
1
- __version__ = "0.1.3"
1
+ __version__ = "0.1.4"
2
2
 
3
3
  __all__ = ["__version__"]
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "llama-index-postprocessor-needlepath"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "llama-index postprocessor needlepath context selection integration"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10,<4.0"
@@ -17,7 +17,7 @@ license = "Apache-2.0"
17
17
  # `llama-index-postprocessor-*` is not discoverable at all.
18
18
  dependencies = [
19
19
  "llama-index-core>=0.13.0,<0.15",
20
- "needlepath>=0.2.3,<1.0.0",
20
+ "needlepath>=0.2.5,<1.0.0",
21
21
  ]
22
22
 
23
23
  [project.optional-dependencies]