zeno-cli 0.3.4__py3-none-any.whl
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.
- zeno_adapters/__init__.py +17 -0
- zeno_adapters/_common.py +38 -0
- zeno_adapters/anthropic.py +68 -0
- zeno_adapters/claude_code.py +101 -0
- zeno_adapters/crewai.py +92 -0
- zeno_adapters/langgraph.py +49 -0
- zeno_adapters/openai.py +108 -0
- zeno_cli/__init__.py +1 -0
- zeno_cli/_hooks/cc_bridge.py +1016 -0
- zeno_cli/doctor.py +535 -0
- zeno_cli/hook_install.py +269 -0
- zeno_cli/hud/__init__.py +1 -0
- zeno_cli/hud/hud_install.py +652 -0
- zeno_cli/hud/zeno_attention.py +288 -0
- zeno_cli/hud/zeno_cognition.py +457 -0
- zeno_cli/hud/zeno_hud.py +496 -0
- zeno_cli/interview_invites.py +342 -0
- zeno_cli/login.py +241 -0
- zeno_cli/main.py +2534 -0
- zeno_cli/onboard.py +206 -0
- zeno_cli/outreach.py +456 -0
- zeno_cli/version.py +67 -0
- zeno_cli-0.3.4.dist-info/METADATA +161 -0
- zeno_cli-0.3.4.dist-info/RECORD +69 -0
- zeno_cli-0.3.4.dist-info/WHEEL +4 -0
- zeno_cli-0.3.4.dist-info/entry_points.txt +4 -0
- zeno_core/__init__.py +67 -0
- zeno_core/analytics.py +193 -0
- zeno_core/rtlx_s.py +460 -0
- zeno_core/streak.py +178 -0
- zeno_core/tlx_s.py +192 -0
- zeno_sdk/__init__.py +6 -0
- zeno_sdk/_generated/__init__.py +6 -0
- zeno_sdk/_generated/client.py +819 -0
- zeno_sdk/_migrations/alembic/env.py +33 -0
- zeno_sdk/_migrations/alembic/script.py.mako +18 -0
- zeno_sdk/_migrations/alembic/versions/0001_initial.py +79 -0
- zeno_sdk/_migrations/alembic/versions/0002_cognition_samples.py +53 -0
- zeno_sdk/_migrations/alembic/versions/0003_cognition_drivers.py +41 -0
- zeno_sdk/_migrations/alembic/versions/0004_transcript_intelligence.py +248 -0
- zeno_sdk/_migrations/alembic.ini +35 -0
- zeno_sdk/_runtime.py +12 -0
- zeno_sdk/adapters/__init__.py +15 -0
- zeno_sdk/adapters/anthropic.py +5 -0
- zeno_sdk/adapters/claude_code.py +5 -0
- zeno_sdk/adapters/crewai.py +5 -0
- zeno_sdk/adapters/langgraph.py +5 -0
- zeno_sdk/adapters/openai.py +5 -0
- zeno_sdk/auth.py +25 -0
- zeno_sdk/client.py +87 -0
- zeno_sdk/config.py +61 -0
- zeno_sdk/daemon.py +72 -0
- zeno_sdk/privacy.py +46 -0
- zeno_sdk/session.py +179 -0
- zeno_sdk/storage.py +487 -0
- zeno_sdk/types/__init__.py +121 -0
- zeno_session_intel/__init__.py +19 -0
- zeno_session_intel/analytics.py +588 -0
- zeno_session_intel/compression.py +123 -0
- zeno_session_intel/ingest.py +376 -0
- zeno_session_intel/model.py +129 -0
- zeno_session_intel/parsers/__init__.py +31 -0
- zeno_session_intel/parsers/claude_code.py +169 -0
- zeno_session_intel/parsers/codex.py +265 -0
- zeno_session_intel/parsers/cursor.py +198 -0
- zeno_session_intel/prices.py +281 -0
- zeno_session_intel/schema.py +277 -0
- zeno_session_intel/signals.py +319 -0
- zeno_session_intel/taxonomy.py +71 -0
zeno_core/tlx_s.py
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"""DEPRECATED 2026-06-07 PM3 - use zeno_core.rtlx_s instead.
|
|
2
|
+
|
|
3
|
+
The 10-subscale NASA-TLX-S TUI was the v0 cognitive-load probe. Research 1
|
|
4
|
+
(2026-06-07 PM3) replaced it with the 5-item RTLX-S (raw NASA-TLX core +
|
|
5
|
+
Supervision + Execution). New code MUST import from zeno_core.rtlx_s.
|
|
6
|
+
|
|
7
|
+
This module is kept on disk so existing tests (tests/test_tlx_s.py) and
|
|
8
|
+
legacy load_probe_records rows remain queryable. See docs/DEPRECATED.md.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import hashlib
|
|
14
|
+
import sys
|
|
15
|
+
from dataclasses import dataclass
|
|
16
|
+
from datetime import UTC, datetime
|
|
17
|
+
|
|
18
|
+
from textual.app import App, ComposeResult
|
|
19
|
+
from textual.containers import Vertical
|
|
20
|
+
from textual.widgets import Button, Input, Label
|
|
21
|
+
|
|
22
|
+
SUBSCALES: tuple[tuple[str, str], ...] = (
|
|
23
|
+
(
|
|
24
|
+
"mental_demand",
|
|
25
|
+
"Mental Demand (NASA-TLX): How mentally demanding was supervising the agent crew?",
|
|
26
|
+
),
|
|
27
|
+
(
|
|
28
|
+
"physical_demand",
|
|
29
|
+
"Physical Demand (NASA-TLX): How physically demanding was the supervision task?",
|
|
30
|
+
),
|
|
31
|
+
(
|
|
32
|
+
"temporal_demand",
|
|
33
|
+
"Temporal Demand (NASA-TLX): How hurried or rushed was the supervision pace?",
|
|
34
|
+
),
|
|
35
|
+
(
|
|
36
|
+
"performance",
|
|
37
|
+
"Performance (NASA-TLX): How successful were you in meeting supervision goals?",
|
|
38
|
+
),
|
|
39
|
+
("effort", "Effort (NASA-TLX): How hard did you have to work to supervise effectively?"),
|
|
40
|
+
(
|
|
41
|
+
"frustration",
|
|
42
|
+
"Frustration (NASA-TLX): How insecure, discouraged, irritated, stressed, "
|
|
43
|
+
"or annoyed were you?",
|
|
44
|
+
),
|
|
45
|
+
(
|
|
46
|
+
"trust_calibration_demand",
|
|
47
|
+
"Trust Calibration Demand (SCLT): How demanding was calibrating trust in agent outputs?",
|
|
48
|
+
),
|
|
49
|
+
(
|
|
50
|
+
"oversight_demand",
|
|
51
|
+
"Oversight Demand (SCLT): How demanding was keeping adequate oversight of all agents?",
|
|
52
|
+
),
|
|
53
|
+
(
|
|
54
|
+
"integration_demand",
|
|
55
|
+
"Integration Demand (SCLT): How demanding was integrating outputs from multiple agents "
|
|
56
|
+
"into one coherent result?",
|
|
57
|
+
),
|
|
58
|
+
(
|
|
59
|
+
"intervention_decision_demand",
|
|
60
|
+
"Intervention Decision Demand (SCLT): How demanding was deciding "
|
|
61
|
+
"when and how to intervene?",
|
|
62
|
+
),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@dataclass(slots=True)
|
|
67
|
+
class TLXSurveyResult:
|
|
68
|
+
skipped: bool
|
|
69
|
+
subscales: dict[str, int] | None
|
|
70
|
+
comment_hash: str | None
|
|
71
|
+
prompted_at: datetime
|
|
72
|
+
responded_at: datetime | None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class NumericSlider(Input):
|
|
76
|
+
def __init__(self, *, value: int = 50, widget_id: str) -> None:
|
|
77
|
+
super().__init__(value=str(value), id=widget_id)
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def slider_value(self) -> int:
|
|
81
|
+
try:
|
|
82
|
+
parsed = int(float(self.value))
|
|
83
|
+
except ValueError:
|
|
84
|
+
parsed = 50
|
|
85
|
+
return max(0, min(100, parsed))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def validate_item_wording() -> dict[str, str]:
|
|
89
|
+
return {key: wording for key, wording in SUBSCALES}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def compute_composite_load(
|
|
93
|
+
subscales: dict[str, int], weights: dict[str, float] | None = None
|
|
94
|
+
) -> float:
|
|
95
|
+
weights = weights or {key: 1.0 for key, _ in SUBSCALES}
|
|
96
|
+
weighted_sum = sum(subscales[key] * weights[key] for key, _ in SUBSCALES)
|
|
97
|
+
weight_total = sum(weights[key] for key, _ in SUBSCALES)
|
|
98
|
+
return weighted_sum / weight_total
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def compute_babysitting_tax_index(composite_load: float, n_agents_active: int) -> float:
|
|
102
|
+
return composite_load * (max(n_agents_active, 0) ** 0.7)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def should_prompt_probe(
|
|
106
|
+
*,
|
|
107
|
+
session_duration_minutes: float,
|
|
108
|
+
sessions_since_last_probe: int,
|
|
109
|
+
probes_enabled: bool,
|
|
110
|
+
seconds_since_last_probe: float | None,
|
|
111
|
+
active_agent_runs: int,
|
|
112
|
+
) -> bool:
|
|
113
|
+
if not probes_enabled:
|
|
114
|
+
return False
|
|
115
|
+
if active_agent_runs > 0:
|
|
116
|
+
return False
|
|
117
|
+
if seconds_since_last_probe is not None and seconds_since_last_probe < 30:
|
|
118
|
+
return False
|
|
119
|
+
if session_duration_minutes > 10:
|
|
120
|
+
return True
|
|
121
|
+
return sessions_since_last_probe >= 5
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class TLXSurveyApp(App[TLXSurveyResult]):
|
|
125
|
+
TITLE = "NASA-TLX-S Survey"
|
|
126
|
+
|
|
127
|
+
def __init__(self) -> None:
|
|
128
|
+
super().__init__()
|
|
129
|
+
self.prompted_at = datetime.now(tz=UTC)
|
|
130
|
+
self._sliders: dict[str, NumericSlider] = {}
|
|
131
|
+
self._comment = Input(placeholder="Optional one-line comment")
|
|
132
|
+
|
|
133
|
+
def compose(self) -> ComposeResult:
|
|
134
|
+
yield Label("Rate each item from 0 to 100.")
|
|
135
|
+
with Vertical():
|
|
136
|
+
for key, wording in SUBSCALES:
|
|
137
|
+
yield Label(wording)
|
|
138
|
+
slider = NumericSlider(value=50, widget_id=f"slider-{key}")
|
|
139
|
+
self._sliders[key] = slider
|
|
140
|
+
yield slider
|
|
141
|
+
yield self._comment
|
|
142
|
+
yield Button("Submit", id="submit")
|
|
143
|
+
yield Button("Skip", id="skip", variant="warning")
|
|
144
|
+
|
|
145
|
+
def on_button_pressed(self, event: Button.Pressed) -> None:
|
|
146
|
+
if event.button.id == "skip":
|
|
147
|
+
self.exit(
|
|
148
|
+
TLXSurveyResult(
|
|
149
|
+
skipped=True,
|
|
150
|
+
subscales=None,
|
|
151
|
+
comment_hash=None,
|
|
152
|
+
prompted_at=self.prompted_at,
|
|
153
|
+
responded_at=None,
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
return
|
|
157
|
+
|
|
158
|
+
if event.button.id == "submit":
|
|
159
|
+
comment = self._comment.value.strip()
|
|
160
|
+
comment_hash = hashlib.sha256(comment.encode("utf-8")).hexdigest() if comment else None
|
|
161
|
+
subscales = {key: self._sliders[key].slider_value for key, _ in SUBSCALES}
|
|
162
|
+
self.exit(
|
|
163
|
+
TLXSurveyResult(
|
|
164
|
+
skipped=False,
|
|
165
|
+
subscales=subscales,
|
|
166
|
+
comment_hash=comment_hash,
|
|
167
|
+
prompted_at=self.prompted_at,
|
|
168
|
+
responded_at=datetime.now(tz=UTC),
|
|
169
|
+
)
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def run_tlx_survey_tui() -> TLXSurveyResult:
|
|
174
|
+
if not sys.stdin.isatty():
|
|
175
|
+
return TLXSurveyResult(
|
|
176
|
+
skipped=True,
|
|
177
|
+
subscales=None,
|
|
178
|
+
comment_hash=None,
|
|
179
|
+
prompted_at=datetime.now(tz=UTC),
|
|
180
|
+
responded_at=None,
|
|
181
|
+
)
|
|
182
|
+
app = TLXSurveyApp()
|
|
183
|
+
result = app.run()
|
|
184
|
+
if isinstance(result, TLXSurveyResult):
|
|
185
|
+
return result
|
|
186
|
+
return TLXSurveyResult(
|
|
187
|
+
skipped=True,
|
|
188
|
+
subscales=None,
|
|
189
|
+
comment_hash=None,
|
|
190
|
+
prompted_at=datetime.now(tz=UTC),
|
|
191
|
+
responded_at=None,
|
|
192
|
+
)
|
zeno_sdk/__init__.py
ADDED