balatrobot 0.6.1__tar.gz → 1.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.
- balatrobot-1.3.0/.claude/settings.json +26 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/.github/workflows/code_quality.yml +4 -4
- balatrobot-1.3.0/.github/workflows/commit_lint.yml +47 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/.github/workflows/release_please.yml +28 -5
- balatrobot-0.6.1/.github/workflows/release-pypi.yml → balatrobot-1.3.0/.github/workflows/release_pypi.yml +10 -11
- balatrobot-1.3.0/.gitignore +330 -0
- balatrobot-1.3.0/.mdformat.toml +5 -0
- balatrobot-1.3.0/.mux/init +43 -0
- balatrobot-1.3.0/.mux/mcp.jsonc +13 -0
- balatrobot-1.3.0/.mux/tool_env +5 -0
- balatrobot-1.3.0/.mux/tool_post +12 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/CHANGELOG.md +408 -0
- balatrobot-1.3.0/CLAUDE.md +171 -0
- balatrobot-1.3.0/Makefile +84 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/PKG-INFO +24 -10
- balatrobot-1.3.0/README.md +47 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/balatrobot.json +2 -1
- balatrobot-1.3.0/balatrobot.lua +80 -0
- balatrobot-1.3.0/docs/api.md +1261 -0
- balatrobot-1.3.0/docs/assets/balatrobench.svg +38 -0
- balatrobot-1.3.0/docs/assets/balatrobot-white.svg +23 -0
- balatrobot-1.3.0/docs/assets/balatrobot.svg +31 -0
- balatrobot-1.3.0/docs/assets/balatrollm.svg +49 -0
- balatrobot-1.3.0/docs/cli.md +204 -0
- balatrobot-1.3.0/docs/contributing.md +313 -0
- balatrobot-1.3.0/docs/example-bot.md +110 -0
- balatrobot-1.3.0/docs/index.md +105 -0
- balatrobot-1.3.0/docs/installation.md +73 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/mkdocs.yml +12 -30
- balatrobot-1.3.0/pyproject.toml +74 -0
- balatrobot-1.3.0/src/balatrobot/__init__.py +7 -0
- balatrobot-1.3.0/src/balatrobot/__main__.py +6 -0
- balatrobot-1.3.0/src/balatrobot/cli.py +56 -0
- balatrobot-1.3.0/src/balatrobot/config.py +101 -0
- balatrobot-1.3.0/src/balatrobot/manager.py +129 -0
- balatrobot-1.3.0/src/balatrobot/platforms/__init__.py +53 -0
- balatrobot-1.3.0/src/balatrobot/platforms/base.py +69 -0
- balatrobot-1.3.0/src/balatrobot/platforms/macos.py +47 -0
- balatrobot-1.3.0/src/balatrobot/platforms/native.py +111 -0
- balatrobot-1.3.0/src/balatrobot/platforms/windows.py +41 -0
- balatrobot-1.3.0/src/lua/core/dispatcher.lua +232 -0
- balatrobot-1.3.0/src/lua/core/server.lua +469 -0
- balatrobot-1.3.0/src/lua/core/validator.lua +94 -0
- balatrobot-1.3.0/src/lua/endpoints/add.lua +499 -0
- balatrobot-1.3.0/src/lua/endpoints/buy.lua +272 -0
- balatrobot-1.3.0/src/lua/endpoints/cash_out.lua +60 -0
- balatrobot-1.3.0/src/lua/endpoints/discard.lua +120 -0
- balatrobot-1.3.0/src/lua/endpoints/gamestate.lua +32 -0
- balatrobot-1.3.0/src/lua/endpoints/health.lua +33 -0
- balatrobot-1.3.0/src/lua/endpoints/load.lua +172 -0
- balatrobot-1.3.0/src/lua/endpoints/menu.lua +50 -0
- balatrobot-1.3.0/src/lua/endpoints/next_round.lua +46 -0
- balatrobot-1.3.0/src/lua/endpoints/pack.lua +385 -0
- balatrobot-1.3.0/src/lua/endpoints/play.lua +165 -0
- balatrobot-1.3.0/src/lua/endpoints/rearrange.lua +237 -0
- balatrobot-1.3.0/src/lua/endpoints/reroll.lua +57 -0
- balatrobot-1.3.0/src/lua/endpoints/save.lua +106 -0
- balatrobot-1.3.0/src/lua/endpoints/screenshot.lua +75 -0
- balatrobot-1.3.0/src/lua/endpoints/select.lua +63 -0
- balatrobot-1.3.0/src/lua/endpoints/sell.lua +160 -0
- balatrobot-1.3.0/src/lua/endpoints/set.lua +215 -0
- balatrobot-1.3.0/src/lua/endpoints/skip.lua +79 -0
- balatrobot-1.3.0/src/lua/endpoints/start.lua +170 -0
- balatrobot-1.3.0/src/lua/endpoints/tests/echo.lua +68 -0
- balatrobot-1.3.0/src/lua/endpoints/tests/endpoint.lua +68 -0
- balatrobot-1.3.0/src/lua/endpoints/tests/error.lua +43 -0
- balatrobot-1.3.0/src/lua/endpoints/tests/state.lua +32 -0
- balatrobot-1.3.0/src/lua/endpoints/tests/validation.lua +82 -0
- balatrobot-1.3.0/src/lua/endpoints/use.lua +219 -0
- balatrobot-1.3.0/src/lua/settings.lua +268 -0
- balatrobot-1.3.0/src/lua/utils/debugger.lua +141 -0
- balatrobot-1.3.0/src/lua/utils/enums.lua +413 -0
- balatrobot-1.3.0/src/lua/utils/errors.lua +22 -0
- balatrobot-1.3.0/src/lua/utils/gamestate.lua +795 -0
- balatrobot-1.3.0/src/lua/utils/logger.lua +99 -0
- balatrobot-1.3.0/src/lua/utils/openrpc.json +2913 -0
- balatrobot-1.3.0/src/lua/utils/types.lua +308 -0
- balatrobot-1.3.0/tests/cli/__init__.py +1 -0
- balatrobot-1.3.0/tests/cli/conftest.py +69 -0
- balatrobot-1.3.0/tests/cli/test_config.py +179 -0
- balatrobot-1.3.0/tests/cli/test_integration.py +59 -0
- balatrobot-1.3.0/tests/cli/test_manager.py +176 -0
- balatrobot-1.3.0/tests/cli/test_platforms.py +178 -0
- balatrobot-1.3.0/tests/conftest.py +6 -0
- balatrobot-1.3.0/tests/fixtures/fixtures.json +2506 -0
- balatrobot-1.3.0/tests/fixtures/generate.py +168 -0
- balatrobot-1.3.0/tests/lua/conftest.py +530 -0
- balatrobot-1.3.0/tests/lua/core/__init__.py +2 -0
- balatrobot-1.3.0/tests/lua/core/test_dispatcher.py +311 -0
- balatrobot-1.3.0/tests/lua/core/test_server.py +493 -0
- balatrobot-1.3.0/tests/lua/core/test_validator.py +437 -0
- balatrobot-1.3.0/tests/lua/endpoints/__init__.py +2 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_add.py +716 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_buy.py +241 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_cash_out.py +35 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_discard.py +111 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_gamestate.py +32 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_health.py +32 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_load.py +65 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_menu.py +22 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_next_round.py +36 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_pack.py +517 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_play.py +125 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_rearrange.py +327 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_reroll.py +65 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_save.py +77 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_screenshot.py +72 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_select.py +58 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_sell.py +194 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_set.py +260 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_skip.py +65 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_start.py +164 -0
- balatrobot-1.3.0/tests/lua/endpoints/test_use.py +359 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/uv.lock +350 -239
- balatrobot-0.6.1/.claude/commands/commit-msg.md +0 -43
- balatrobot-0.6.1/.claude/commands/commit.md +0 -53
- balatrobot-0.6.1/.claude/commands/test.md +0 -3
- balatrobot-0.6.1/.claude/settings.json +0 -36
- balatrobot-0.6.1/.cursor/rules/docs-formatting.mdc +0 -51
- balatrobot-0.6.1/.cursor/rules/python-development.mdc +0 -602
- balatrobot-0.6.1/.envrc.example +0 -9
- balatrobot-0.6.1/.gitattributes +0 -2
- balatrobot-0.6.1/.gitignore +0 -12
- balatrobot-0.6.1/.gitmodules +0 -0
- balatrobot-0.6.1/.mdformat.toml +0 -11
- balatrobot-0.6.1/.vscode/extensions.json +0 -11
- balatrobot-0.6.1/.vscode/settings.json +0 -6
- balatrobot-0.6.1/CLAUDE.md +0 -111
- balatrobot-0.6.1/Makefile +0 -155
- balatrobot-0.6.1/README.md +0 -31
- balatrobot-0.6.1/balatro.sh +0 -462
- balatrobot-0.6.1/balatrobot.lua +0 -17
- balatrobot-0.6.1/bots/example.py +0 -45
- balatrobot-0.6.1/bots/replay.py +0 -170
- balatrobot-0.6.1/docs/assets/balatrobot.svg +0 -68
- balatrobot-0.6.1/docs/balatrobot-api.md +0 -141
- balatrobot-0.6.1/docs/contributing.md +0 -276
- balatrobot-0.6.1/docs/developing-bots.md +0 -147
- balatrobot-0.6.1/docs/index.md +0 -44
- balatrobot-0.6.1/docs/installation.md +0 -262
- balatrobot-0.6.1/docs/logging-systems.md +0 -119
- balatrobot-0.6.1/docs/protocol-api.md +0 -230
- balatrobot-0.6.1/pyproject.toml +0 -56
- balatrobot-0.6.1/runs/.gitkeep +0 -0
- balatrobot-0.6.1/src/balatrobot/__init__.py +0 -21
- balatrobot-0.6.1/src/balatrobot/client.py +0 -483
- balatrobot-0.6.1/src/balatrobot/enums.py +0 -478
- balatrobot-0.6.1/src/balatrobot/exceptions.py +0 -166
- balatrobot-0.6.1/src/balatrobot/models.py +0 -402
- balatrobot-0.6.1/src/balatrobot/py.typed +0 -0
- balatrobot-0.6.1/src/lua/api.lua +0 -1535
- balatrobot-0.6.1/src/lua/log.lua +0 -526
- balatrobot-0.6.1/src/lua/settings.lua +0 -247
- balatrobot-0.6.1/src/lua/types.lua +0 -373
- balatrobot-0.6.1/src/lua/utils.lua +0 -1086
- balatrobot-0.6.1/tests/balatrobot/conftest.py +0 -21
- balatrobot-0.6.1/tests/balatrobot/test_client.py +0 -484
- balatrobot-0.6.1/tests/balatrobot/test_exceptions.py +0 -90
- balatrobot-0.6.1/tests/balatrobot/test_models.py +0 -30
- balatrobot-0.6.1/tests/conftest.py +0 -41
- balatrobot-0.6.1/tests/lua/conftest.py +0 -165
- balatrobot-0.6.1/tests/lua/endpoints/checkpoints/basic_shop_setup.jkr +0 -3
- balatrobot-0.6.1/tests/lua/endpoints/checkpoints/buy_cant_use.jkr +0 -3
- balatrobot-0.6.1/tests/lua/endpoints/checkpoints/plasma_deck.jkr +0 -3
- balatrobot-0.6.1/tests/lua/endpoints/test_cash_out.py +0 -65
- balatrobot-0.6.1/tests/lua/endpoints/test_get_gamestate.py +0 -56
- balatrobot-0.6.1/tests/lua/endpoints/test_get_save_info.py +0 -68
- balatrobot-0.6.1/tests/lua/endpoints/test_go_to_menu.py +0 -33
- balatrobot-0.6.1/tests/lua/endpoints/test_load_save.py +0 -58
- balatrobot-0.6.1/tests/lua/endpoints/test_play_hand_or_discard.py +0 -277
- balatrobot-0.6.1/tests/lua/endpoints/test_rearrange_consumables.py +0 -257
- balatrobot-0.6.1/tests/lua/endpoints/test_rearrange_hand.py +0 -154
- balatrobot-0.6.1/tests/lua/endpoints/test_rearrange_jokers.py +0 -195
- balatrobot-0.6.1/tests/lua/endpoints/test_sell_consumable.py +0 -238
- balatrobot-0.6.1/tests/lua/endpoints/test_sell_joker.py +0 -277
- balatrobot-0.6.1/tests/lua/endpoints/test_shop.py +0 -582
- balatrobot-0.6.1/tests/lua/endpoints/test_skip_or_select_blind.py +0 -230
- balatrobot-0.6.1/tests/lua/endpoints/test_start_run.py +0 -100
- balatrobot-0.6.1/tests/lua/endpoints/test_use_consumable.py +0 -411
- balatrobot-0.6.1/tests/lua/test_connection.py +0 -119
- balatrobot-0.6.1/tests/lua/test_log.py +0 -207
- balatrobot-0.6.1/tests/lua/test_protocol_errors.py +0 -182
- balatrobot-0.6.1/tests/runs/buy_joker.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/no_shop.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/rearrange_consumables.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/rearrange_jokers.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/sell_consumables.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/sell_jokers.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/shop_reroll.jsonl +0 -3
- balatrobot-0.6.1/tests/runs/use_consumable.planet.jsonl +0 -3
- {balatrobot-0.6.1 → balatrobot-1.3.0}/.editorconfig +0 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/.github/workflows/deploy_docs.yml +0 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/.python-version +0 -0
- {balatrobot-0.6.1 → balatrobot-1.3.0}/LICENSE +0 -0
- {balatrobot-0.6.1/tests/lua → balatrobot-1.3.0/tests}/__init__.py +0 -0
- {balatrobot-0.6.1/tests/lua/endpoints → balatrobot-1.3.0/tests/lua}/__init__.py +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(pytest:*)",
|
|
5
|
+
"Bash(make:*)"
|
|
6
|
+
],
|
|
7
|
+
"deny": [
|
|
8
|
+
"Edit(CHANGELOG.md)",
|
|
9
|
+
"Write(CHANGELOG.md)"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"hooks": {
|
|
13
|
+
"PostToolUse": [
|
|
14
|
+
{
|
|
15
|
+
"matcher": "Write|Edit",
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "make quality",
|
|
20
|
+
"timeout": 5
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -26,7 +26,7 @@ jobs:
|
|
|
26
26
|
with:
|
|
27
27
|
version: latest
|
|
28
28
|
args: format --check
|
|
29
|
-
|
|
29
|
+
ty:
|
|
30
30
|
name: Type Check & Markdown Format
|
|
31
31
|
runs-on: ubuntu-latest
|
|
32
32
|
needs: ruff
|
|
@@ -44,15 +44,15 @@ jobs:
|
|
|
44
44
|
- name: Install dependencies
|
|
45
45
|
run: |
|
|
46
46
|
uv venv
|
|
47
|
-
uv sync --dev
|
|
47
|
+
uv sync --group dev --group test
|
|
48
48
|
- name: Check markdown formatting
|
|
49
49
|
run: |
|
|
50
50
|
source .venv/bin/activate
|
|
51
51
|
mdformat --check .
|
|
52
|
-
- name: Run
|
|
52
|
+
- name: Run ty
|
|
53
53
|
run: |
|
|
54
54
|
source .venv/bin/activate
|
|
55
|
-
|
|
55
|
+
ty check
|
|
56
56
|
stylua:
|
|
57
57
|
name: StyLua
|
|
58
58
|
runs-on: ubuntu-latest
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Commit Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
commitizen:
|
|
17
|
+
name: Validate Commit Messages
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0 # Need full history for commit range
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version-file: ".python-version"
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@v5
|
|
31
|
+
with:
|
|
32
|
+
enable-cache: true
|
|
33
|
+
cache-dependency-glob: "uv.lock"
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: |
|
|
37
|
+
uv venv
|
|
38
|
+
uv sync --group dev
|
|
39
|
+
|
|
40
|
+
- name: Validate commits
|
|
41
|
+
run: |
|
|
42
|
+
uv run cz check --rev-range origin/${{ github.base_ref }}..HEAD
|
|
43
|
+
|
|
44
|
+
- name: Validate PR title
|
|
45
|
+
if: github.event_name == 'pull_request'
|
|
46
|
+
run: |
|
|
47
|
+
echo "${{ github.event.pull_request.title }}" | uv run cz check
|
|
@@ -43,6 +43,12 @@ jobs:
|
|
|
43
43
|
# Update version in balatrobot.json
|
|
44
44
|
jq --arg version "${{ steps.release.outputs.version }}" '.version = $version' balatrobot.json > balatrobot.json.tmp
|
|
45
45
|
mv balatrobot.json.tmp balatrobot.json
|
|
46
|
+
- name: Update openrpc.json version
|
|
47
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
48
|
+
run: |
|
|
49
|
+
# Update version in openrpc.json
|
|
50
|
+
jq --arg version "${{ steps.release.outputs.version }}" '.info.version = $version' src/lua/utils/openrpc.json > src/lua/utils/openrpc.json.tmp
|
|
51
|
+
mv src/lua/utils/openrpc.json.tmp src/lua/utils/openrpc.json
|
|
46
52
|
- name: Commit and push updated lock file
|
|
47
53
|
if: ${{ steps.release.outputs.release_created }}
|
|
48
54
|
run: |
|
|
@@ -53,13 +59,30 @@ jobs:
|
|
|
53
59
|
else
|
|
54
60
|
echo "No changes to uv.lock"
|
|
55
61
|
fi
|
|
56
|
-
- name: Commit and push updated
|
|
62
|
+
- name: Commit and push updated version files
|
|
57
63
|
if: ${{ steps.release.outputs.release_created }}
|
|
58
64
|
run: |
|
|
59
|
-
if [[ -n $(git status --porcelain balatrobot.json) ]]; then
|
|
60
|
-
git add balatrobot.json
|
|
61
|
-
git commit -m "chore(release): update
|
|
65
|
+
if [[ -n $(git status --porcelain balatrobot.json src/lua/utils/openrpc.json) ]]; then
|
|
66
|
+
git add balatrobot.json src/lua/utils/openrpc.json
|
|
67
|
+
git commit -m "chore(release): update version files to ${{ steps.release.outputs.version }}"
|
|
62
68
|
git push
|
|
63
69
|
else
|
|
64
|
-
echo "No changes to
|
|
70
|
+
echo "No changes to version files"
|
|
65
71
|
fi
|
|
72
|
+
- name: Notify consumer repo of new balatrobot release
|
|
73
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
74
|
+
env:
|
|
75
|
+
BALATROLLM_REPO: "coder/balatrollm"
|
|
76
|
+
BALATROLLM_TOKEN: ${{ secrets.BALATROLLM_TOKEN }}
|
|
77
|
+
BALATRO_REPO: "S1M0N38/balatro"
|
|
78
|
+
BALATRO_TOKEN: ${{ secrets.BALATRO_TOKEN }}
|
|
79
|
+
run: |
|
|
80
|
+
VERSION="${{ steps.release.outputs.version }}"
|
|
81
|
+
curl -X POST -H "Accept: application/vnd.github+json" \
|
|
82
|
+
-H "Authorization: token $BALATROLLM_TOKEN" \
|
|
83
|
+
https://api.github.com/repos/$BALATROLLM_REPO/dispatches \
|
|
84
|
+
-d "{\"event_type\":\"balatrobot_release\",\"client_payload\":{\"version\":\"$VERSION\"}}"
|
|
85
|
+
curl -X POST -H "Accept: application/vnd.github+json" \
|
|
86
|
+
-H "Authorization: token $BALATRO_TOKEN" \
|
|
87
|
+
https://api.github.com/repos/$BALATRO_REPO/dispatches \
|
|
88
|
+
-d "{\"event_type\":\"balatrobot_release\",\"client_payload\":{\"version\":\"$VERSION\"}}"
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
name: Release PyPI
|
|
2
|
-
|
|
3
2
|
on:
|
|
4
3
|
push:
|
|
5
4
|
tags:
|
|
6
5
|
- v*
|
|
7
6
|
workflow_dispatch:
|
|
8
|
-
|
|
9
7
|
jobs:
|
|
10
8
|
pypi:
|
|
11
9
|
name: Publish to PyPI
|
|
12
10
|
runs-on: ubuntu-latest
|
|
13
11
|
environment:
|
|
14
|
-
name:
|
|
12
|
+
name: pypi
|
|
15
13
|
permissions:
|
|
16
14
|
id-token: write
|
|
15
|
+
contents: read
|
|
17
16
|
steps:
|
|
18
|
-
-
|
|
19
|
-
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v5
|
|
20
19
|
- name: Install uv
|
|
21
|
-
uses: astral-sh/setup-uv@
|
|
22
|
-
|
|
23
|
-
- name: "Set up Python"
|
|
20
|
+
uses: astral-sh/setup-uv@v7
|
|
21
|
+
- name: Set up Python
|
|
24
22
|
uses: actions/setup-python@v5
|
|
25
23
|
with:
|
|
26
24
|
python-version-file: ".python-version"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
25
|
+
- name: Build
|
|
26
|
+
run: uv build
|
|
27
|
+
- name: Publish
|
|
28
|
+
run: uv publish
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
################################################################################
|
|
2
|
+
# MacOS
|
|
3
|
+
################################################################################
|
|
4
|
+
|
|
5
|
+
# General
|
|
6
|
+
.DS_Store
|
|
7
|
+
__MACOSX/
|
|
8
|
+
.AppleDouble
|
|
9
|
+
.LSOverride
|
|
10
|
+
Icon[
|
|
11
|
+
|
|
12
|
+
# Thumbnails
|
|
13
|
+
._*
|
|
14
|
+
|
|
15
|
+
# Files that might appear in the root of a volume
|
|
16
|
+
.DocumentRevisions-V100
|
|
17
|
+
.fseventsd
|
|
18
|
+
.Spotlight-V100
|
|
19
|
+
.TemporaryItems
|
|
20
|
+
.Trashes
|
|
21
|
+
.VolumeIcon.icns
|
|
22
|
+
.com.apple.timemachine.donotpresent
|
|
23
|
+
|
|
24
|
+
# Directories potentially created on remote AFP share
|
|
25
|
+
.AppleDB
|
|
26
|
+
.AppleDesktop
|
|
27
|
+
Network Trash Folder
|
|
28
|
+
Temporary Items
|
|
29
|
+
.apdisk
|
|
30
|
+
|
|
31
|
+
################################################################################
|
|
32
|
+
# Python
|
|
33
|
+
################################################################################
|
|
34
|
+
|
|
35
|
+
# Byte-compiled / optimized / DLL files
|
|
36
|
+
__pycache__/
|
|
37
|
+
*.py[codz]
|
|
38
|
+
*$py.class
|
|
39
|
+
|
|
40
|
+
# C extensions
|
|
41
|
+
*.so
|
|
42
|
+
|
|
43
|
+
# Distribution / packaging
|
|
44
|
+
.Python
|
|
45
|
+
build/
|
|
46
|
+
develop-eggs/
|
|
47
|
+
dist/
|
|
48
|
+
downloads/
|
|
49
|
+
eggs/
|
|
50
|
+
.eggs/
|
|
51
|
+
lib/
|
|
52
|
+
lib64/
|
|
53
|
+
parts/
|
|
54
|
+
sdist/
|
|
55
|
+
var/
|
|
56
|
+
wheels/
|
|
57
|
+
share/python-wheels/
|
|
58
|
+
*.egg-info/
|
|
59
|
+
.installed.cfg
|
|
60
|
+
*.egg
|
|
61
|
+
MANIFEST
|
|
62
|
+
|
|
63
|
+
# PyInstaller
|
|
64
|
+
# Usually these files are written by a python script from a template
|
|
65
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
66
|
+
*.manifest
|
|
67
|
+
*.spec
|
|
68
|
+
|
|
69
|
+
# Installer logs
|
|
70
|
+
pip-log.txt
|
|
71
|
+
pip-delete-this-directory.txt
|
|
72
|
+
|
|
73
|
+
# Unit test / coverage reports
|
|
74
|
+
htmlcov/
|
|
75
|
+
.tox/
|
|
76
|
+
.nox/
|
|
77
|
+
.coverage
|
|
78
|
+
.coverage.*
|
|
79
|
+
.cache
|
|
80
|
+
nosetests.xml
|
|
81
|
+
coverage.xml
|
|
82
|
+
*.cover
|
|
83
|
+
*.py.cover
|
|
84
|
+
.hypothesis/
|
|
85
|
+
.pytest_cache/
|
|
86
|
+
cover/
|
|
87
|
+
|
|
88
|
+
# Translations
|
|
89
|
+
*.mo
|
|
90
|
+
*.pot
|
|
91
|
+
|
|
92
|
+
# Django stuff:
|
|
93
|
+
*.log
|
|
94
|
+
local_settings.py
|
|
95
|
+
db.sqlite3
|
|
96
|
+
db.sqlite3-journal
|
|
97
|
+
|
|
98
|
+
# Flask stuff:
|
|
99
|
+
instance/
|
|
100
|
+
.webassets-cache
|
|
101
|
+
|
|
102
|
+
# Scrapy stuff:
|
|
103
|
+
.scrapy
|
|
104
|
+
|
|
105
|
+
# Sphinx documentation
|
|
106
|
+
docs/_build/
|
|
107
|
+
|
|
108
|
+
# PyBuilder
|
|
109
|
+
.pybuilder/
|
|
110
|
+
target/
|
|
111
|
+
|
|
112
|
+
# Jupyter Notebook
|
|
113
|
+
.ipynb_checkpoints
|
|
114
|
+
|
|
115
|
+
# IPython
|
|
116
|
+
profile_default/
|
|
117
|
+
ipython_config.py
|
|
118
|
+
|
|
119
|
+
# pyenv
|
|
120
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
121
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
122
|
+
# .python-version
|
|
123
|
+
|
|
124
|
+
# pipenv
|
|
125
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
126
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
127
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
128
|
+
# install all needed dependencies.
|
|
129
|
+
# Pipfile.lock
|
|
130
|
+
|
|
131
|
+
# UV
|
|
132
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
133
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
134
|
+
# commonly ignored for libraries.
|
|
135
|
+
# uv.lock
|
|
136
|
+
|
|
137
|
+
# poetry
|
|
138
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
139
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
140
|
+
# commonly ignored for libraries.
|
|
141
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
142
|
+
# poetry.lock
|
|
143
|
+
# poetry.toml
|
|
144
|
+
|
|
145
|
+
# pdm
|
|
146
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
147
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
148
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
149
|
+
# pdm.lock
|
|
150
|
+
# pdm.toml
|
|
151
|
+
.pdm-python
|
|
152
|
+
.pdm-build/
|
|
153
|
+
|
|
154
|
+
# pixi
|
|
155
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
156
|
+
# pixi.lock
|
|
157
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
158
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
159
|
+
.pixi
|
|
160
|
+
|
|
161
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
162
|
+
__pypackages__/
|
|
163
|
+
|
|
164
|
+
# Celery stuff
|
|
165
|
+
celerybeat-schedule
|
|
166
|
+
celerybeat.pid
|
|
167
|
+
|
|
168
|
+
# Redis
|
|
169
|
+
*.rdb
|
|
170
|
+
*.aof
|
|
171
|
+
*.pid
|
|
172
|
+
|
|
173
|
+
# RabbitMQ
|
|
174
|
+
mnesia/
|
|
175
|
+
rabbitmq/
|
|
176
|
+
rabbitmq-data/
|
|
177
|
+
|
|
178
|
+
# ActiveMQ
|
|
179
|
+
activemq-data/
|
|
180
|
+
|
|
181
|
+
# SageMath parsed files
|
|
182
|
+
*.sage.py
|
|
183
|
+
|
|
184
|
+
# Environments
|
|
185
|
+
.env
|
|
186
|
+
.envrc
|
|
187
|
+
.venv
|
|
188
|
+
env/
|
|
189
|
+
venv/
|
|
190
|
+
ENV/
|
|
191
|
+
env.bak/
|
|
192
|
+
venv.bak/
|
|
193
|
+
|
|
194
|
+
# Spyder project settings
|
|
195
|
+
.spyderproject
|
|
196
|
+
.spyproject
|
|
197
|
+
|
|
198
|
+
# Rope project settings
|
|
199
|
+
.ropeproject
|
|
200
|
+
|
|
201
|
+
# mkdocs documentation
|
|
202
|
+
/site
|
|
203
|
+
|
|
204
|
+
# mypy
|
|
205
|
+
.mypy_cache/
|
|
206
|
+
.dmypy.json
|
|
207
|
+
dmypy.json
|
|
208
|
+
|
|
209
|
+
# Pyre type checker
|
|
210
|
+
.pyre/
|
|
211
|
+
|
|
212
|
+
# pytype static type analyzer
|
|
213
|
+
.pytype/
|
|
214
|
+
|
|
215
|
+
# Cython debug symbols
|
|
216
|
+
cython_debug/
|
|
217
|
+
|
|
218
|
+
# PyCharm
|
|
219
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
220
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
221
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
222
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
223
|
+
# .idea/
|
|
224
|
+
|
|
225
|
+
# Abstra
|
|
226
|
+
# Abstra is an AI-powered process automation framework.
|
|
227
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
228
|
+
# Learn more at https://abstra.io/docs
|
|
229
|
+
.abstra/
|
|
230
|
+
|
|
231
|
+
# Visual Studio Code
|
|
232
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
233
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
234
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
235
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
236
|
+
# .vscode/
|
|
237
|
+
|
|
238
|
+
# Ruff stuff:
|
|
239
|
+
.ruff_cache/
|
|
240
|
+
|
|
241
|
+
# PyPI configuration file
|
|
242
|
+
.pypirc
|
|
243
|
+
|
|
244
|
+
# Marimo
|
|
245
|
+
marimo/_static/
|
|
246
|
+
marimo/_lsp/
|
|
247
|
+
__marimo__/
|
|
248
|
+
|
|
249
|
+
# Streamlit
|
|
250
|
+
.streamlit/secrets.toml
|
|
251
|
+
|
|
252
|
+
################################################################################
|
|
253
|
+
# Lua
|
|
254
|
+
################################################################################
|
|
255
|
+
|
|
256
|
+
# Lua Language Server
|
|
257
|
+
.luarc.json
|
|
258
|
+
|
|
259
|
+
# Compiled Lua sources
|
|
260
|
+
luac.out
|
|
261
|
+
|
|
262
|
+
# luarocks build files
|
|
263
|
+
*.src.rock
|
|
264
|
+
*.zip
|
|
265
|
+
*.tar.gz
|
|
266
|
+
|
|
267
|
+
# Object files
|
|
268
|
+
*.o
|
|
269
|
+
*.os
|
|
270
|
+
*.ko
|
|
271
|
+
*.obj
|
|
272
|
+
*.elf
|
|
273
|
+
|
|
274
|
+
# Precompiled Headers
|
|
275
|
+
*.gch
|
|
276
|
+
*.pch
|
|
277
|
+
|
|
278
|
+
# Libraries
|
|
279
|
+
*.lib
|
|
280
|
+
*.a
|
|
281
|
+
*.la
|
|
282
|
+
*.lo
|
|
283
|
+
*.def
|
|
284
|
+
*.exp
|
|
285
|
+
|
|
286
|
+
# Shared objects (inc. Windows DLLs)
|
|
287
|
+
*.dll
|
|
288
|
+
*.so
|
|
289
|
+
*.so.*
|
|
290
|
+
*.dylib
|
|
291
|
+
|
|
292
|
+
# Executables
|
|
293
|
+
*.exe
|
|
294
|
+
*.out
|
|
295
|
+
*.app
|
|
296
|
+
*.i*86
|
|
297
|
+
*.x86_64
|
|
298
|
+
*.hex
|
|
299
|
+
|
|
300
|
+
################################################################################
|
|
301
|
+
# Other files
|
|
302
|
+
################################################################################
|
|
303
|
+
|
|
304
|
+
# smods
|
|
305
|
+
smods
|
|
306
|
+
smods.wiki
|
|
307
|
+
|
|
308
|
+
# lovely dump
|
|
309
|
+
dump
|
|
310
|
+
|
|
311
|
+
# balatro
|
|
312
|
+
balatro
|
|
313
|
+
*.jkr
|
|
314
|
+
|
|
315
|
+
# balatrobot
|
|
316
|
+
runs/*.jsonl
|
|
317
|
+
|
|
318
|
+
################################################################################
|
|
319
|
+
# Legacy files
|
|
320
|
+
################################################################################
|
|
321
|
+
|
|
322
|
+
src/lua_old
|
|
323
|
+
src/lua_oldish
|
|
324
|
+
|
|
325
|
+
tests/lua_old
|
|
326
|
+
balatrobot_old.lua
|
|
327
|
+
balatrobot_oldish.lua
|
|
328
|
+
|
|
329
|
+
balatro_oldish.sh
|
|
330
|
+
balatro.sh
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
echo "Runtime: $MUX_RUNTIME"
|
|
5
|
+
echo "Project path: $MUX_PROJECT_PATH"
|
|
6
|
+
echo "Workspace: $PWD"
|
|
7
|
+
|
|
8
|
+
if [ "$MUX_RUNTIME" = "ssh" ]; then
|
|
9
|
+
echo "SSH runtime not supported"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
if [ "$MUX_RUNTIME" != "local" ]; then
|
|
14
|
+
# Copy .envrc from project root
|
|
15
|
+
if [ -f "../.envrc" ]; then
|
|
16
|
+
echo "Copying .envrc from parent..."
|
|
17
|
+
cp "../.envrc" ".envrc"
|
|
18
|
+
elif [ -n "$MUX_PROJECT_PATH" ] && [ -f "$MUX_PROJECT_PATH/.envrc" ]; then
|
|
19
|
+
echo "Copying .envrc from project root..."
|
|
20
|
+
cp "$MUX_PROJECT_PATH/.envrc" ".envrc"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Copy .luarc.json for Lua language server
|
|
24
|
+
if [ -f "../.luarc.json" ]; then
|
|
25
|
+
echo "Copying .luarc.json from parent..."
|
|
26
|
+
cp "../.luarc.json" ".luarc.json"
|
|
27
|
+
elif [ -n "$MUX_PROJECT_PATH" ] && [ -f "$MUX_PROJECT_PATH/.luarc.json" ]; then
|
|
28
|
+
echo "Copying .luarc.json from project root..."
|
|
29
|
+
cp "$MUX_PROJECT_PATH/.luarc.json" ".luarc.json"
|
|
30
|
+
fi
|
|
31
|
+
else
|
|
32
|
+
echo "Local mode: using existing config files"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
echo "Setting up Python environment..."
|
|
36
|
+
uv sync --group dev --group test
|
|
37
|
+
|
|
38
|
+
if [ -f ".envrc" ]; then
|
|
39
|
+
echo "Sourcing .envrc..."
|
|
40
|
+
source .envrc
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
echo "Init complete!"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Runs after every tool execution
|
|
3
|
+
|
|
4
|
+
# Run quality checks after Python or Lua file edits
|
|
5
|
+
if [[ "$MUX_TOOL" == file_edit_* ]]; then
|
|
6
|
+
file=$(echo "$MUX_TOOL_INPUT" | jq -r '.file_path')
|
|
7
|
+
|
|
8
|
+
if [[ "$file" == *.py ]] || [[ "$file" == *.lua ]]; then
|
|
9
|
+
echo "Running quality checks..." >&2
|
|
10
|
+
make quality 2>&1 || exit 1
|
|
11
|
+
fi
|
|
12
|
+
fi
|