jevkit 0.1.0__tar.gz → 0.1.1__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,10 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jevkit
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: First open-source third-party Python client for OpenRouter's Decisions API (Jev, by TypeSafe) - calibrated-probability decision model, not a chat model.
5
5
  Author: jevkit contributors
6
6
  License: MIT
7
- Project-URL: Homepage, https://github.com/block/buzz
8
7
  Keywords: jev,openrouter,decisions,calibration,agent,noul,gating
9
8
  Classifier: Development Status :: 4 - Beta
10
9
  Classifier: Intended Audience :: Developers
@@ -1,10 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jevkit
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: First open-source third-party Python client for OpenRouter's Decisions API (Jev, by TypeSafe) - calibrated-probability decision model, not a chat model.
5
5
  Author: jevkit contributors
6
6
  License: MIT
7
- Project-URL: Homepage, https://github.com/block/buzz
8
7
  Keywords: jev,openrouter,decisions,calibration,agent,noul,gating
9
8
  Classifier: Development Status :: 4 - Beta
10
9
  Classifier: Intended Audience :: Developers
@@ -4,7 +4,6 @@ pyproject.toml
4
4
  jevkit/__init__.py
5
5
  jevkit/cli.py
6
6
  jevkit/client.py
7
- jevkit/test_jevkit.py
8
7
  jevkit.egg-info/PKG-INFO
9
8
  jevkit.egg-info/SOURCES.txt
10
9
  jevkit.egg-info/dependency_links.txt
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "jevkit"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "First open-source third-party Python client for OpenRouter's Decisions API (Jev, by TypeSafe) - calibrated-probability decision model, not a chat model."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -19,9 +19,6 @@ classifiers = [
19
19
  "Topic :: Software Development :: Libraries :: Python Modules",
20
20
  ]
21
21
 
22
- [project.urls]
23
- Homepage = "https://github.com/block/buzz"
24
-
25
22
  [tool.setuptools.packages.find]
26
23
  include = ["jevkit*"]
27
24
 
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env python3
2
- """test_jevkit.py — jevkit 测试(需要 OPENROUTER_API_KEY 才跑真调用)。
3
-
4
- 用法:
5
- python3 -m jevkit.test_jevkit # 真调用测试
6
- """
7
- import os
8
- import unittest
9
-
10
-
11
- class TestGate(unittest.TestCase):
12
- """gate 决策门(不需要 key)。"""
13
-
14
- def test_act(self):
15
- from jevkit import gate
16
- self.assertEqual(gate(0.8), 'act')
17
- self.assertEqual(gate(0.7), 'act')
18
-
19
- def test_confirm(self):
20
- from jevkit import gate
21
- self.assertEqual(gate(0.6), 'confirm')
22
- self.assertEqual(gate(0.5), 'confirm')
23
-
24
- def test_escalate(self):
25
- from jevkit import gate
26
- self.assertEqual(gate(0.4), 'escalate')
27
- self.assertEqual(gate(0.0), 'escalate')
28
-
29
- def test_borderline_flips(self):
30
- """borderline 会翻转 — confirm 档不自动执行(坑 2)。"""
31
- from jevkit import gate
32
- # 0.5-0.7 区间永远 confirm,不会 act
33
- for p in (0.5, 0.55, 0.6, 0.65, 0.69):
34
- self.assertEqual(gate(p), 'confirm', f'{p} 应该是 confirm(不自动执行)')
35
-
36
-
37
- class TestClient(unittest.TestCase):
38
- """Client(需要 key — 真调用)。"""
39
-
40
- def setUp(self):
41
- if not os.environ.get('OPENROUTER_API_KEY'):
42
- self.skipTest('OPENROUTER_API_KEY not set')
43
-
44
- def test_noul_real(self):
45
- from jevkit import Client
46
- client = Client()
47
- p = client.noul(
48
- 'worth_outreach',
49
- 'Is this lead worth cold outreach?',
50
- {'true': 'Explicit budget + concrete need.',
51
- 'false': 'No budget or self-promotion.'},
52
- state='HN post: [Hiring] N8n automation expert, $2k budget, urgent',
53
- )
54
- self.assertIsInstance(p, float)
55
- self.assertGreaterEqual(p, 0.0)
56
- self.assertLessEqual(p, 1.0)
57
-
58
- def test_no_key_error(self):
59
- """无 key 时 RuntimeError(fallback 友好 — except Exception 能接住)。"""
60
- from jevkit import Client
61
- saved = os.environ.pop('OPENROUTER_API_KEY', None)
62
- try:
63
- client = Client(api_key='')
64
- with self.assertRaises(RuntimeError):
65
- client.noul('q', 'i', {'true': 't', 'false': 'f'}, state='s')
66
- finally:
67
- if saved:
68
- os.environ['OPENROUTER_API_KEY'] = saved
69
-
70
-
71
- if __name__ == '__main__':
72
- unittest.main(verbosity=2)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes