narada 0.2.6__tar.gz → 0.2.7__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: narada
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Python client SDK for Narada
5
5
  Project-URL: Homepage, https://github.com/NaradaAI/narada-python-sdk/narada
6
6
  Project-URL: Repository, https://github.com/NaradaAI/narada-python-sdk
@@ -9,7 +9,7 @@ Author-email: Narada <support@narada.ai>
9
9
  License-Expression: Apache-2.0
10
10
  Requires-Python: >=3.12
11
11
  Requires-Dist: aiohttp>=3.12.13
12
- Requires-Dist: narada-core==0.1.3
12
+ Requires-Dist: narada-core==0.1.4
13
13
  Requires-Dist: packaging==24.2
14
14
  Requires-Dist: playwright>=1.53.0
15
15
  Requires-Dist: rich>=14.0.0
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "narada"
3
- version = "0.2.6"
3
+ version = "0.2.7"
4
4
  description = "Python client SDK for Narada"
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
7
7
  authors = [{ name = "Narada", email = "support@narada.ai" }]
8
8
  requires-python = ">=3.12"
9
9
  dependencies = [
10
- "narada-core==0.1.3",
10
+ "narada-core==0.1.4",
11
11
  "aiohttp>=3.12.13",
12
12
  "playwright>=1.53.0",
13
13
  "rich>=14.0.0",
@@ -1,6 +1,6 @@
1
1
  from narada_core.actions.models import (
2
- ActiveInputRequest,
3
2
  CriticResult,
3
+ HitlInputMetadata,
4
4
  PressKeyEventItem,
5
5
  )
6
6
  from narada_core.errors import (
@@ -37,7 +37,7 @@ from narada.version import __version__
37
37
 
38
38
  __all__ = [
39
39
  "__version__",
40
- "ActiveInputRequest",
40
+ "HitlInputMetadata",
41
41
  "Agent",
42
42
  "AgentKind",
43
43
  "BaseBrowserEnvironment",
@@ -40,10 +40,10 @@ from uuid import uuid4
40
40
 
41
41
  import aiohttp
42
42
  from narada_core.actions.models import (
43
- ActiveInputRequest,
44
43
  CloseWindowRequest,
45
44
  ExtensionActionRequest,
46
45
  ExtensionActionResponse,
46
+ HitlInputMetadata,
47
47
  )
48
48
  from narada_core.errors import (
49
49
  NaradaAgentTimeoutError_INTERNAL_DO_NOT_USE,
@@ -93,7 +93,7 @@ _ResponseModel = TypeVar("_ResponseModel", bound=BaseModel)
93
93
 
94
94
  # Optional remote-dispatch context. In frontend Pyodide runs, these are generated
95
95
  # by prepare-code.ts; extension-action calls forward them so the parent request
96
- # can report active input-required status.
96
+ # can report HITL input-required status.
97
97
  _REMOTE_DISPATCH_REQUEST_ID_ENV_VAR = "NARADA_REMOTE_DISPATCH_REQUEST_ID"
98
98
  _REMOTE_DISPATCH_API_KEY_ID_ENV_VAR = "NARADA_REMOTE_DISPATCH_API_KEY_ID"
99
99
  _BROWSER_WINDOW_ID_SELECTOR = "#narada-browser-window-id"
@@ -325,7 +325,7 @@ def _build_browser_window_id_observer_script() -> str:
325
325
  )
326
326
 
327
327
 
328
- type InputRequiredCallback = Callable[[ActiveInputRequest], Awaitable[None] | None]
328
+ type InputRequiredCallback = Callable[[HitlInputMetadata], Awaitable[None] | None]
329
329
 
330
330
 
331
331
  def _load_execution_trace_context_from_env() -> dict[str, Any] | None:
@@ -346,16 +346,16 @@ async def _notify_input_required_callback(
346
346
  if callback is None or response.get("status") != "input-required":
347
347
  return
348
348
 
349
- active_input_request_data = response.get("activeInputRequest")
350
- if active_input_request_data is None:
349
+ hitl_input_metadata_data = response.get("hitlInputMetadata")
350
+ if hitl_input_metadata_data is None:
351
351
  return
352
352
 
353
- active_input_request = ActiveInputRequest.model_validate(active_input_request_data)
354
- if active_input_request.input_id in seen_input_ids:
353
+ hitl_input_metadata = HitlInputMetadata.model_validate(hitl_input_metadata_data)
354
+ if hitl_input_metadata.input_id in seen_input_ids:
355
355
  return
356
356
 
357
- seen_input_ids.add(active_input_request.input_id)
358
- callback_result = callback(active_input_request)
357
+ seen_input_ids.add(hitl_input_metadata.input_id)
358
+ callback_result = callback(hitl_input_metadata)
359
359
  if inspect.isawaitable(callback_result):
360
360
  await callback_result
361
361
 
@@ -58,7 +58,7 @@ class _RemoteDispatchFakeClientSession:
58
58
  "usage": {"actions": 1, "credits": 1},
59
59
  "createdAt": "2026-01-01T00:00:00Z",
60
60
  "completedAt": "2026-01-01T00:00:01Z",
61
- "activeInputRequest": None,
61
+ "hitlInputMetadata": None,
62
62
  }
63
63
  )
64
64
 
@@ -106,7 +106,7 @@ async def test_dispatch_request_calls_input_required_callback_once_per_input_id(
106
106
  "usage": None,
107
107
  "createdAt": "2026-01-01T00:00:00Z",
108
108
  "completedAt": None,
109
- "activeInputRequest": {
109
+ "hitlInputMetadata": {
110
110
  "inputId": "input-1",
111
111
  "action": {
112
112
  "name": "prompt_for_user_input",
@@ -123,7 +123,7 @@ async def test_dispatch_request_calls_input_required_callback_once_per_input_id(
123
123
  "usage": None,
124
124
  "createdAt": "2026-01-01T00:00:00Z",
125
125
  "completedAt": None,
126
- "activeInputRequest": {
126
+ "hitlInputMetadata": {
127
127
  "inputId": "input-1",
128
128
  "action": {
129
129
  "name": "prompt_for_user_input",
@@ -140,7 +140,7 @@ async def test_dispatch_request_calls_input_required_callback_once_per_input_id(
140
140
  "usage": None,
141
141
  "createdAt": "2026-01-01T00:00:00Z",
142
142
  "completedAt": None,
143
- "activeInputRequest": {
143
+ "hitlInputMetadata": {
144
144
  "inputId": "input-2",
145
145
  "action": {
146
146
  "name": "user_approval",
@@ -157,7 +157,7 @@ async def test_dispatch_request_calls_input_required_callback_once_per_input_id(
157
157
  "usage": {"actions": 1, "credits": 1},
158
158
  "createdAt": "2026-01-01T00:00:00Z",
159
159
  "completedAt": "2026-01-01T00:00:01Z",
160
- "activeInputRequest": None,
160
+ "hitlInputMetadata": None,
161
161
  },
162
162
  ]
163
163
  )
@@ -169,8 +169,8 @@ async def test_dispatch_request_calls_input_required_callback_once_per_input_id(
169
169
 
170
170
  observed_input_ids: list[str] = []
171
171
 
172
- async def on_input_required(active_input_request) -> None:
173
- observed_input_ids.append(active_input_request.input_id)
172
+ async def on_input_required(hitl_input_metadata) -> None:
173
+ observed_input_ids.append(hitl_input_metadata.input_id)
174
174
 
175
175
  env = RemoteBrowserEnvironment(browser_window_id="bw-1", api_key="test-key")
176
176
 
@@ -206,7 +206,7 @@ async def test_dispatch_request_includes_execution_trace_context(
206
206
  "usage": {"actions": 1, "credits": 1},
207
207
  "createdAt": "2026-01-01T00:00:00Z",
208
208
  "completedAt": "2026-01-01T00:00:01Z",
209
- "activeInputRequest": None,
209
+ "hitlInputMetadata": None,
210
210
  }
211
211
  ]
212
212
  )
@@ -824,7 +824,7 @@ async def test_agent_run_exposes_workflow_trace_alias(
824
824
  },
825
825
  "completedAt": "2026-01-01T00:00:01Z",
826
826
  "usage": {"actions": 0, "credits": 0},
827
- "activeInputRequest": None,
827
+ "hitlInputMetadata": None,
828
828
  }
829
829
  ),
830
830
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes