ask-human 0.3.0__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 (45) hide show
  1. ask_human-0.3.0/.github/workflows/ci.yml +68 -0
  2. ask_human-0.3.0/.github/workflows/publish-pypi.yml +37 -0
  3. ask_human-0.3.0/.gitignore +12 -0
  4. ask_human-0.3.0/.python-version +1 -0
  5. ask_human-0.3.0/LICENSE +22 -0
  6. ask_human-0.3.0/PKG-INFO +630 -0
  7. ask_human-0.3.0/README.md +594 -0
  8. ask_human-0.3.0/mcp-server-config.json +18 -0
  9. ask_human-0.3.0/pyproject.toml +85 -0
  10. ask_human-0.3.0/pyrightconfig.json +31 -0
  11. ask_human-0.3.0/src/ask_human/__init__.py +7 -0
  12. ask_human-0.3.0/src/ask_human/__main__.py +6 -0
  13. ask_human-0.3.0/src/ask_human/assets/agent-asks.icns +0 -0
  14. ask_human-0.3.0/src/ask_human/assets/agent-asks.ico +0 -0
  15. ask_human-0.3.0/src/ask_human/assets/agent-asks.png +0 -0
  16. ask_human-0.3.0/src/ask_human/assets/telegram/icon-color-bg-blue.png +0 -0
  17. ask_human-0.3.0/src/ask_human/assets/telegram/icon-color-codex-bevel-alt2.png +0 -0
  18. ask_human-0.3.0/src/ask_human/assets/telegram/icon-color-codex-bevel-mac.png +0 -0
  19. ask_human-0.3.0/src/ask_human/assets/telegram/icon-color-round-alt.png +0 -0
  20. ask_human-0.3.0/src/ask_human/assets/telegram/icon-color-round.png +0 -0
  21. ask_human-0.3.0/src/ask_human/broker_state.py +215 -0
  22. ask_human-0.3.0/src/ask_human/dialogs.py +311 -0
  23. ask_human-0.3.0/src/ask_human/prompt_formatting.py +168 -0
  24. ask_human-0.3.0/src/ask_human/server.py +540 -0
  25. ask_human-0.3.0/src/ask_human/telegram_broker.py +220 -0
  26. ask_human-0.3.0/src/ask_human/telegram_broker_client.py +251 -0
  27. ask_human-0.3.0/src/ask_human/telegram_client.py +865 -0
  28. ask_human-0.3.0/src/ask_human/telegram_models.py +85 -0
  29. ask_human-0.3.0/tests/__init__.py +1 -0
  30. ask_human-0.3.0/tests/conftest.py +9 -0
  31. ask_human-0.3.0/tests/test_dev_setup.py +83 -0
  32. ask_human-0.3.0/tests/test_dialog_timeout.py +106 -0
  33. ask_human-0.3.0/tests/test_dialog_timing_info.py +154 -0
  34. ask_human-0.3.0/tests/test_dialog_title.py +46 -0
  35. ask_human-0.3.0/tests/test_entry_points.py +34 -0
  36. ask_human-0.3.0/tests/test_icon_paths.py +30 -0
  37. ask_human-0.3.0/tests/test_macos_dialog.py +38 -0
  38. ask_human-0.3.0/tests/test_mcp_server.py +27 -0
  39. ask_human-0.3.0/tests/test_package.py +21 -0
  40. ask_human-0.3.0/tests/test_readme_features.py +47 -0
  41. ask_human-0.3.0/tests/test_telegram_broker.py +261 -0
  42. ask_human-0.3.0/tests/test_telegram_broker_client.py +111 -0
  43. ask_human-0.3.0/tests/test_telegram_response_channel.py +780 -0
  44. ask_human-0.3.0/tests/test_windows_dpi.py +116 -0
  45. ask_human-0.3.0/uv.lock +1191 -0
@@ -0,0 +1,68 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ checks:
9
+ name: Checks
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Check out repository
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.13"
20
+
21
+ - name: Install package and dev tools
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ python -m pip install -e ".[dev]"
25
+
26
+ - name: Run format checks
27
+ run: |
28
+ black --check .
29
+ isort --check-only .
30
+
31
+ - name: Run type checks
32
+ run: |
33
+ mypy src
34
+ pyright
35
+
36
+ - name: Run tests
37
+ run: pytest
38
+
39
+ - name: Build package
40
+ run: |
41
+ python -m build
42
+ python -m twine check dist/*
43
+
44
+ tests:
45
+ name: Tests (${{ matrix.os }}, py${{ matrix.python-version }})
46
+ runs-on: ${{ matrix.os }}
47
+ strategy:
48
+ fail-fast: false
49
+ matrix:
50
+ os: [ubuntu-latest, macos-latest, windows-latest]
51
+ python-version: ["3.10", "3.13"]
52
+
53
+ steps:
54
+ - name: Check out repository
55
+ uses: actions/checkout@v4
56
+
57
+ - name: Set up Python
58
+ uses: actions/setup-python@v5
59
+ with:
60
+ python-version: ${{ matrix.python-version }}
61
+
62
+ - name: Install package and dev tools
63
+ run: |
64
+ python -m pip install --upgrade pip
65
+ python -m pip install -e ".[dev]"
66
+
67
+ - name: Run tests
68
+ run: pytest
@@ -0,0 +1,37 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ publish:
12
+ name: Publish
13
+ runs-on: ubuntu-latest
14
+ environment: pypi
15
+ permissions:
16
+ contents: read
17
+ id-token: write
18
+
19
+ steps:
20
+ - name: Check out repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.13"
27
+
28
+ - name: Install build backend
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ python -m pip install build
32
+
33
+ - name: Build package
34
+ run: python -m build
35
+
36
+ - name: Publish package
37
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ scratchpad/
9
+ # Virtual environments
10
+ .venv
11
+ .history/
12
+ /tmp
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sontal/Sun Hui
4
+ Copyright (c) 2026 Alex Che
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.