hani 0.3.1__tar.gz → 0.3.2__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.
Files changed (92) hide show
  1. {hani-0.3.1 → hani-0.3.2}/CHANGELOG.md +70 -0
  2. {hani-0.3.1/src/hani.egg-info → hani-0.3.2}/PKG-INFO +13 -4
  3. {hani-0.3.1 → hani-0.3.2}/README.md +10 -2
  4. {hani-0.3.1 → hani-0.3.2}/pyproject.toml +5 -4
  5. {hani-0.3.1 → hani-0.3.2}/src/hani/app.py +1576 -211
  6. {hani-0.3.1 → hani-0.3.2}/src/hani/auth.py +1 -5
  7. {hani-0.3.1 → hani-0.3.2}/src/hani/common.py +9 -10
  8. {hani-0.3.1 → hani-0.3.2}/src/hani/dual_auth.py +8 -13
  9. {hani-0.3.1 → hani-0.3.2}/src/hani/event_analytics.py +8 -36
  10. {hani-0.3.1 → hani-0.3.2}/src/hani/event_tracking.py +1 -1
  11. {hani-0.3.1 → hani-0.3.2}/src/hani/experiment_selector.py +2 -10
  12. {hani-0.3.1 → hani-0.3.2}/src/hani/helpers/negotiators.py +3 -5
  13. {hani-0.3.1 → hani-0.3.2}/src/hani/helpers.py +2 -2
  14. {hani-0.3.1 → hani-0.3.2}/src/hani/llm_service.py +3 -9
  15. {hani-0.3.1 → hani-0.3.2}/src/hani/negotiator.py +1 -5
  16. {hani-0.3.1 → hani-0.3.2}/src/hani/register.py +3 -16
  17. {hani-0.3.1 → hani-0.3.2}/src/hani/run.py +63 -56
  18. {hani-0.3.1 → hani-0.3.2}/src/hani/runapp.py +29 -16
  19. {hani-0.3.1 → hani-0.3.2}/src/hani/runexperiment.py +1 -3
  20. {hani-0.3.1 → hani-0.3.2}/src/hani/runguest.py +21 -4
  21. {hani-0.3.1 → hani-0.3.2}/src/hani/runregister.py +20 -8
  22. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Grocery/Grocery.yml +0 -1
  23. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Grocery/_info.yaml +3 -4
  24. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Island/Island.yml +0 -1
  25. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Island/_info.yaml +2 -3
  26. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Trade/_info.yaml +3 -3
  27. {hani-0.3.1 → hani-0.3.2}/src/hani/scenarios/grocery.py +3 -14
  28. {hani-0.3.1 → hani-0.3.2}/src/hani/scenarios/island.py +3 -12
  29. {hani-0.3.1 → hani-0.3.2}/src/hani/scenarios/trade.py +1 -5
  30. {hani-0.3.1 → hani-0.3.2}/src/hani/serve_dual.py +2 -10
  31. {hani-0.3.1 → hani-0.3.2}/src/hani/static/theme.css +12 -12
  32. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/generator.py +5 -10
  33. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/histograms.py +2 -8
  34. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/history.py +2 -11
  35. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/outcome_plot.py +3 -13
  36. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/preferences.py +2 -2
  37. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/results.py +1 -2
  38. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/tool.py +7 -19
  39. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/urange.py +3 -9
  40. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/utility_plot2d.py +2 -6
  41. {hani-0.3.1 → hani-0.3.2/src/hani.egg-info}/PKG-INFO +13 -4
  42. {hani-0.3.1 → hani-0.3.2}/tests/test_auth.py +1 -6
  43. {hani-0.3.1 → hani-0.3.2}/LICENSE +0 -0
  44. {hani-0.3.1 → hani-0.3.2}/MANIFEST.in +0 -0
  45. {hani-0.3.1 → hani-0.3.2}/setup.cfg +0 -0
  46. {hani-0.3.1 → hani-0.3.2}/src/hani/__init__.py +0 -0
  47. {hani-0.3.1 → hani-0.3.2}/src/hani/announcements.md +0 -0
  48. {hani-0.3.1 → hani-0.3.2}/src/hani/color_palettes.py +0 -0
  49. {hani-0.3.1 → hani-0.3.2}/src/hani/config/default.yaml +0 -0
  50. {hani-0.3.1 → hani-0.3.2}/src/hani/default_settings/consent.md +0 -0
  51. {hani-0.3.1 → hani-0.3.2}/src/hani/default_settings/env.json +0 -0
  52. {hani-0.3.1 → hani-0.3.2}/src/hani/default_settings/llm_settings.json +0 -0
  53. {hani-0.3.1 → hani-0.3.2}/src/hani/default_settings/scenario_order.txt +0 -0
  54. {hani-0.3.1 → hani-0.3.2}/src/hani/events.py +0 -0
  55. {hani-0.3.1 → hani-0.3.2}/src/hani/find_scenario_source.py +0 -0
  56. {hani-0.3.1 → hani-0.3.2}/src/hani/helpers/__init__.py +0 -0
  57. {hani-0.3.1 → hani-0.3.2}/src/hani/images/hani.JPG +0 -0
  58. {hani-0.3.1 → hani-0.3.2}/src/hani/images/hani1.JPG +0 -0
  59. {hani-0.3.1 → hani-0.3.2}/src/hani/images/hani2.JPG +0 -0
  60. {hani-0.3.1 → hani-0.3.2}/src/hani/images/hani3.JPG +0 -0
  61. {hani-0.3.1 → hani-0.3.2}/src/hani/images/hani4.JPG +0 -0
  62. {hani-0.3.1 → hani-0.3.2}/src/hani/make_scenarios.py +0 -0
  63. {hani-0.3.1 → hani-0.3.2}/src/hani/runanalytics.py +0 -0
  64. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Grocery/agent.yml +0 -0
  65. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Grocery/display.py +0 -0
  66. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Grocery/human.yml +0 -0
  67. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Island/agent.yml +0 -0
  68. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Island/display.py +0 -0
  69. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Island/human.yml +0 -0
  70. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Trade/Buyer.yml +0 -0
  71. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Trade/Seller.yml +0 -0
  72. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Trade/Trade.yml +0 -0
  73. {hani-0.3.1 → hani-0.3.2}/src/hani/sample_scenarios/Default/Trade/display.py +0 -0
  74. {hani-0.3.1 → hani-0.3.2}/src/hani/scenario_makers.py +0 -0
  75. {hani-0.3.1 → hani-0.3.2}/src/hani/scenarios/__init__.py +0 -0
  76. {hani-0.3.1 → hani-0.3.2}/src/hani/scenarios/base.py +0 -0
  77. {hani-0.3.1 → hani-0.3.2}/src/hani/scenarios/common.py +0 -0
  78. {hani-0.3.1 → hani-0.3.2}/src/hani/templates/basic_login.html +0 -0
  79. {hani-0.3.1 → hani-0.3.2}/src/hani/templates/logout.html +0 -0
  80. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/__init__.py +0 -0
  81. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/helpers/__init__.py +0 -0
  82. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/random.py +0 -0
  83. {hani-0.3.1 → hani-0.3.2}/src/hani/tools/scenario_info.py +0 -0
  84. {hani-0.3.1 → hani-0.3.2}/src/hani.egg-info/SOURCES.txt +0 -0
  85. {hani-0.3.1 → hani-0.3.2}/src/hani.egg-info/dependency_links.txt +0 -0
  86. {hani-0.3.1 → hani-0.3.2}/src/hani.egg-info/entry_points.txt +0 -0
  87. {hani-0.3.1 → hani-0.3.2}/src/hani.egg-info/requires.txt +0 -0
  88. {hani-0.3.1 → hani-0.3.2}/src/hani.egg-info/top_level.txt +0 -0
  89. {hani-0.3.1 → hani-0.3.2}/tests/test_event_tracking.py +0 -0
  90. {hani-0.3.1 → hani-0.3.2}/tests/test_registration.py +0 -0
  91. {hani-0.3.1 → hani-0.3.2}/tests/test_scenario_loading.py +0 -0
  92. {hani-0.3.1 → hani-0.3.2}/tests/test_tools.py +0 -0
@@ -5,6 +5,76 @@ All notable changes to the HANI (Human-Agent Negotiation Interface) project will
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.2] - 2026-05-22
9
+
10
+ ### Added
11
+ - **Prolific integration**, end-to-end:
12
+ - PID-derived user identity, per-PID state under
13
+ `~/negmas/hani/db/prolific_<PID>/` (`prolific_session.json`,
14
+ `schedule.json`, `results.csv`, `last_scenario.txt`).
15
+ - Practice round + `PROLIFIC_N_REQUIRED` counted rounds, zero-action
16
+ rounds replay with the same finalist, returning-participant skip
17
+ of practice, deterministic per-PID domain pinning when no schedule.
18
+ - Env knobs: `PROLIFIC_N_REQUIRED`, `PROLIFIC_MAX_MINUTES`,
19
+ `PROLIFIC_AUTO_START_SECONDS`, `PROLIFIC_FINALISTS`,
20
+ `PROLIFIC_PER_NEG_YAML`, `SCMLWEB_BASE_URL`.
21
+ - Auto-start timer on Load, completion link to
22
+ `{SCMLWEB_BASE_URL}/prolific/done?PROLIFIC_PID=<pid>`.
23
+ - Per-negotiation YAML questionnaire (likert/yes_no/select/text),
24
+ rendered between counted rounds.
25
+ - New `docs/prolific.md` documenting all of the above.
26
+ - **Typing indicator** ("Partner is thinking…") shown in the history
27
+ column while the partner computes a response; partner step is
28
+ deferred to the next Bokeh tick so the indicator paints first.
29
+ - **Offer panel UX**:
30
+ - `n_issue_columns: 1|2` field in each domain's `_info.yaml`; all
31
+ three defaults (Trade, Grocery, Island) switched to 2.
32
+ - Counter-offer UI hidden until the participant clicks Reject, with
33
+ a new "Offer Panel Always Visible" toggle to override.
34
+ - Reject keeps the "Offer on the table" line visible; only the
35
+ decision buttons hide.
36
+ - Send / Undo Decision moved next to the text input; text input
37
+ enlarged.
38
+ - 1- or 2-column issue layout, with much tighter vertical spacing
39
+ between issue rows and the utility line.
40
+ - Chat bubbles: smaller internal padding, no blank line between text
41
+ and offer, inline blue `OFFER:` label.
42
+ - **Confirmation dialog**: when the user is about to accept an offer
43
+ whose utility is below their reserved value, a red warning explains
44
+ that ending the negotiation would yield the (higher) reserved value
45
+ instead.
46
+ - `--port` flag on every entry point (`hani`, `hani main`,
47
+ `hani guest`, `hani-app`, `hani-guest`, `hani-reg`), with envvar
48
+ fallbacks `HANI_PORT`, `HANI_GUEST_PORT`, `HANI_REG_PORT`.
49
+
50
+ ### Changed
51
+ - **Admin-only settings are hidden, not just disabled.** Text & Offers,
52
+ Offer Initialization, Timing, Scenario, and Partner cards (and their
53
+ inner widgets) are invisible to non-admins. In particular, Prolific
54
+ participants can no longer see the partner agent types.
55
+ - **Sidebar locks** at the start of the first counted Prolific round
56
+ for non-admins, so appearance/behavior settings can't be changed
57
+ mid-session.
58
+ - "Reject & Counter" button renamed to "Reject".
59
+ - "Value in case of Disagreement" → "Value on Disagreement" throughout.
60
+ - "User Results" pane hidden in guest/Prolific mode.
61
+ - Lowered `requires-python` to `>=3.11` (no 3.12/3.13-only syntax used
62
+ anywhere in `src/`). CI matrix expanded to 3.11/3.12/3.13.
63
+
64
+ ### Fixed
65
+ - "Offer on the table" line at the bottom of the action panel no
66
+ longer freezes at the first partner offer; it updates on every
67
+ round, and `on_accept`/`do_accept` read the *latest* partner offer.
68
+ - Counter-offer UI re-appears on the round after the participant sent
69
+ a counter (cached action panel was returning stale visibility flags).
70
+ - End-of-round toast now reflects the actual outcome ("timed out",
71
+ "was ended by you", "was ended by the AI agent",
72
+ "reached an agreement"); `results.csv` gains an `ended_by` column.
73
+ - Accept and human-side End now reliably count toward the Prolific
74
+ quota even when `full_trace` did not attribute a row to the human.
75
+ - Per-negotiation questionnaire labels rendered above the widgets
76
+ (Panel sometimes truncated `name` inside Select/RadioBoxGroup).
77
+
8
78
  ## [0.3.1] - 2026-05-18
9
79
 
10
80
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hani
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Run Human-Agent Negotiations
5
5
  Author-email: Yasser Mohammad <yasserfarouk@gmail.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -9,11 +9,12 @@ Project-URL: Documentation, https://yasserfarouk.github.io/hani/
9
9
  Project-URL: Repository, https://github.com/yasserfarouk/hani
10
10
  Project-URL: Changelog, https://github.com/yasserfarouk/hani/blob/main/CHANGELOG.md
11
11
  Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
12
13
  Classifier: Programming Language :: Python :: 3.12
13
14
  Classifier: Programming Language :: Python :: 3.13
14
15
  Classifier: Programming Language :: Python :: 3.14
15
16
  Classifier: Programming Language :: Python :: Implementation :: CPython
16
- Requires-Python: >=3.13
17
+ Requires-Python: >=3.11
17
18
  Description-Content-Type: text/markdown
18
19
  License-File: LICENSE
19
20
  Requires-Dist: cryptography>=44.0.2
@@ -90,11 +91,19 @@ Then open your browser to `http://localhost:5006` and log in:
90
91
  |---------|-------------|
91
92
  | `hani` | Start all services (main app + guest playground) |
92
93
  | `hani setup` | Initialize settings directory with default configuration |
93
- | `hani main` | Start only the main app (port 5006) |
94
- | `hani guest` | Start only the guest/playground app (port 5008) |
94
+ | `hani main` | Start only the main app (default port 5006) |
95
+ | `hani guest` | Start only the guest/playground app (default port 5008) |
95
96
  | `hani auth` | Show OAuth setup instructions |
96
97
  | `hani --help` | Show all available commands and options |
97
98
 
99
+ Each command accepts a `--port` flag (e.g. `hani guest --port 12000`,
100
+ `hani-app --port 6006`, `hani-reg --port 5107`). The top-level `hani`
101
+ command takes `--main-port` / `--guest-port` to override both services
102
+ at once. Equivalent env vars: `HANI_PORT`, `HANI_GUEST_PORT`,
103
+ `HANI_REG_PORT`.
104
+
105
+ For paid Prolific studies, see [docs/prolific.md](docs/prolific.md).
106
+
98
107
  ### Command Options
99
108
 
100
109
  ```bash
@@ -50,11 +50,19 @@ Then open your browser to `http://localhost:5006` and log in:
50
50
  |---------|-------------|
51
51
  | `hani` | Start all services (main app + guest playground) |
52
52
  | `hani setup` | Initialize settings directory with default configuration |
53
- | `hani main` | Start only the main app (port 5006) |
54
- | `hani guest` | Start only the guest/playground app (port 5008) |
53
+ | `hani main` | Start only the main app (default port 5006) |
54
+ | `hani guest` | Start only the guest/playground app (default port 5008) |
55
55
  | `hani auth` | Show OAuth setup instructions |
56
56
  | `hani --help` | Show all available commands and options |
57
57
 
58
+ Each command accepts a `--port` flag (e.g. `hani guest --port 12000`,
59
+ `hani-app --port 6006`, `hani-reg --port 5107`). The top-level `hani`
60
+ command takes `--main-port` / `--guest-port` to override both services
61
+ at once. Equivalent env vars: `HANI_PORT`, `HANI_GUEST_PORT`,
62
+ `HANI_REG_PORT`.
63
+
64
+ For paid Prolific studies, see [docs/prolific.md](docs/prolific.md).
65
+
58
66
  ### Command Options
59
67
 
60
68
  ```bash
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hani"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Run Human-Agent Negotiations"
5
5
  license = "AGPL-3.0-or-later"
6
6
  authors = [
@@ -8,13 +8,14 @@ authors = [
8
8
  ]
9
9
  classifiers = [
10
10
  "Programming Language :: Python :: 3",
11
+ "Programming Language :: Python :: 3.11",
11
12
  "Programming Language :: Python :: 3.12",
12
13
  "Programming Language :: Python :: 3.13",
13
14
  "Programming Language :: Python :: 3.14",
14
15
  "Programming Language :: Python :: Implementation :: CPython",
15
16
  ]
16
17
  readme = "README.md"
17
- requires-python = ">=3.13"
18
+ requires-python = ">=3.11"
18
19
  dependencies = [
19
20
  "cryptography>=44.0.2",
20
21
  "hvplot>=0.11.2",
@@ -49,7 +50,7 @@ where = ["src"]
49
50
  [tool.setuptools.package-data]
50
51
  hani = [
51
52
  "images/*.JPG",
52
- "images/*.jpg",
53
+ "images/*.jpg",
53
54
  "images/*.png",
54
55
  "templates/*.html",
55
56
  "sample_scenarios/**/*.yml",
@@ -113,7 +114,7 @@ collect_ignore = ['setup.py']
113
114
  warn_unused_configs = false
114
115
  warn_incomplete_stub = true
115
116
  check_untyped_defs = true
116
- python_version = "3.13"
117
+ python_version = "3.11"
117
118
  strict_optional = false
118
119
  ignore_missing_imports = false
119
120