sub-pool-client 0.1.1__tar.gz → 0.2.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.
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/.github/workflows/publish.yml +7 -32
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/PKG-INFO +4 -4
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/README.md +1 -1
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/examples/hello.py +1 -1
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/meta/README.md +1 -1
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/meta/pyproject.toml +2 -2
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/pyproject.toml +2 -2
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/_version.py +2 -2
- sub_pool_client-0.1.1/.github/workflows/sync-from-upstream.yml +0 -93
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/.gitignore +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/examples/codex_hello.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/__init__.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/_cli_core.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/_cli_provider.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/_health_watcher.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/_shared.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/_swap.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/cli_claude.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/cli_codex.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/client.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/codex.py +0 -0
- {sub_pool_client-0.1.1 → sub_pool_client-0.2.0}/sub_pool_client/errors.py +0 -0
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
name: publish
|
|
2
2
|
|
|
3
|
-
# Tag-driven publish for sub-pool-client.
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# doesn't go out without a click).
|
|
3
|
+
# Tag-driven publish for sub-pool-client. The PyPI job is gated by the
|
|
4
|
+
# `pypi` GitHub environment (configure it to require a reviewer so the
|
|
5
|
+
# real publish doesn't go out without a click).
|
|
7
6
|
#
|
|
8
|
-
# Trusted Publishing — no long-lived tokens.
|
|
9
|
-
#
|
|
10
|
-
# workflow=publish.yml)
|
|
11
|
-
#
|
|
12
|
-
# - PyPI env=pypi project=sub-pool-client
|
|
13
|
-
# - TestPyPI env=testpypi project=sub-pool-client
|
|
7
|
+
# Trusted Publishing — no long-lived tokens. One pending publisher
|
|
8
|
+
# needs to be registered (owner=subs-pool, repo=sub-pool-client,
|
|
9
|
+
# workflow=publish.yml, env=pypi, project=sub-pool-client).
|
|
14
10
|
#
|
|
15
11
|
# The companion `sub-pool` placeholder distribution (see meta/) is
|
|
16
12
|
# wired up in source but NOT in this workflow — register a pending
|
|
@@ -46,29 +42,8 @@ jobs:
|
|
|
46
42
|
name: dist
|
|
47
43
|
path: dist/
|
|
48
44
|
|
|
49
|
-
testpypi:
|
|
50
|
-
needs: build
|
|
51
|
-
runs-on: ubuntu-latest
|
|
52
|
-
environment:
|
|
53
|
-
name: testpypi
|
|
54
|
-
url: https://test.pypi.org/project/sub-pool-client/
|
|
55
|
-
permissions:
|
|
56
|
-
id-token: write
|
|
57
|
-
steps:
|
|
58
|
-
- uses: actions/download-artifact@v4
|
|
59
|
-
with:
|
|
60
|
-
name: dist
|
|
61
|
-
path: dist/
|
|
62
|
-
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
63
|
-
with:
|
|
64
|
-
repository-url: https://test.pypi.org/legacy/
|
|
65
|
-
# Allow re-running the workflow on the same tag (cosmetic
|
|
66
|
-
# README amends etc.) without hard-failing on a duplicate
|
|
67
|
-
# version.
|
|
68
|
-
skip-existing: true
|
|
69
|
-
|
|
70
45
|
pypi:
|
|
71
|
-
needs:
|
|
46
|
+
needs: build
|
|
72
47
|
runs-on: ubuntu-latest
|
|
73
48
|
environment:
|
|
74
49
|
name: pypi
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sub-pool-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Python client + `sp-claude` / `sp-codex` CLIs for a sub-pool credential broker.
|
|
5
|
-
Project-URL: Homepage, https://github.com/
|
|
6
|
-
Project-URL: Repository, https://github.com/
|
|
5
|
+
Project-URL: Homepage, https://github.com/subs-pool/sub-pool-client
|
|
6
|
+
Project-URL: Repository, https://github.com/subs-pool/sub-pool-client
|
|
7
7
|
Requires-Python: >=3.12
|
|
8
8
|
Requires-Dist: claude-agent-sdk>=0.1.63
|
|
9
9
|
Requires-Dist: click>=8.1
|
|
@@ -47,7 +47,7 @@ uv pip install sub-pool-client
|
|
|
47
47
|
Latest release tracks `main`. To install from source instead:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
pip install git+https://github.com/
|
|
50
|
+
pip install git+https://github.com/subs-pool/sub-pool-client
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
## Environment
|
|
@@ -35,7 +35,7 @@ uv pip install sub-pool-client
|
|
|
35
35
|
Latest release tracks `main`. To install from source instead:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
pip install git+https://github.com/
|
|
38
|
+
pip install git+https://github.com/subs-pool/sub-pool-client
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Environment
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Before running:
|
|
4
4
|
1. Install: uv pip install -e . -e ./client
|
|
5
|
-
2. Run pool: docker compose up -d (
|
|
5
|
+
2. Run pool: docker compose up -d (from the sub-pool deployment dir)
|
|
6
6
|
3. Log in an account via the admin UI + create an API key
|
|
7
7
|
4. Run: SUB_POOL_URL=http://localhost:8787 \
|
|
8
8
|
SUB_POOL_KEY=cp-... \
|
|
@@ -17,5 +17,5 @@ pip install sub-pool-client
|
|
|
17
17
|
Then either use the CLIs (`sp-claude`, `sp-codex`) or the Python SDK
|
|
18
18
|
(`from sub_pool_client import PooledClient, PooledCodexClient`).
|
|
19
19
|
|
|
20
|
-
See <https://github.com/
|
|
20
|
+
See <https://github.com/subs-pool/sub-pool-client> for the full client
|
|
21
21
|
docs.
|
|
@@ -7,8 +7,8 @@ requires-python = ">=3.12"
|
|
|
7
7
|
dependencies = ["sub-pool-client"]
|
|
8
8
|
|
|
9
9
|
[project.urls]
|
|
10
|
-
Homepage = "https://github.com/
|
|
11
|
-
Repository = "https://github.com/
|
|
10
|
+
Homepage = "https://github.com/subs-pool/sub-pool-client"
|
|
11
|
+
Repository = "https://github.com/subs-pool/sub-pool-client"
|
|
12
12
|
|
|
13
13
|
[build-system]
|
|
14
14
|
requires = ["hatchling"]
|
|
@@ -11,8 +11,8 @@ dependencies = [
|
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
[project.urls]
|
|
14
|
-
Homepage = "https://github.com/
|
|
15
|
-
Repository = "https://github.com/
|
|
14
|
+
Homepage = "https://github.com/subs-pool/sub-pool-client"
|
|
15
|
+
Repository = "https://github.com/subs-pool/sub-pool-client"
|
|
16
16
|
|
|
17
17
|
[project.scripts]
|
|
18
18
|
sp-claude = "sub_pool_client.cli_claude:main"
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
name: sync-from-upstream
|
|
2
|
-
|
|
3
|
-
# Pull the canonical client source from a private upstream monorepo
|
|
4
|
-
# into this standalone mirror. Mirror-only files (meta/, the workflow
|
|
5
|
-
# files themselves, mirror README, examples/codex_hello.py,
|
|
6
|
-
# pyproject.toml, .gitignore) are NOT touched — only `sub_pool_client/`
|
|
7
|
-
# and `examples/hello.py` get refreshed.
|
|
8
|
-
#
|
|
9
|
-
# Opens a PR rather than committing directly so a human eyeballs the
|
|
10
|
-
# diff before it goes out.
|
|
11
|
-
#
|
|
12
|
-
# Setup required (one-time):
|
|
13
|
-
# - Add two repo secrets (Settings → Secrets and variables → Actions):
|
|
14
|
-
# UPSTREAM_REPO "<owner>/<repo>" of the upstream monorepo
|
|
15
|
-
# UPSTREAM_TOKEN fine-grained PAT with Contents: Read scoped to
|
|
16
|
-
# that one repo (https://github.com/settings/tokens)
|
|
17
|
-
|
|
18
|
-
on:
|
|
19
|
-
schedule:
|
|
20
|
-
- cron: "0 4 * * 1" # weekly Monday 04:00 UTC
|
|
21
|
-
workflow_dispatch: # also manually-triggerable from the Actions tab
|
|
22
|
-
|
|
23
|
-
permissions:
|
|
24
|
-
contents: write
|
|
25
|
-
pull-requests: write
|
|
26
|
-
|
|
27
|
-
jobs:
|
|
28
|
-
sync:
|
|
29
|
-
runs-on: ubuntu-latest
|
|
30
|
-
steps:
|
|
31
|
-
- name: Checkout mirror
|
|
32
|
-
uses: actions/checkout@v4
|
|
33
|
-
|
|
34
|
-
- name: Checkout upstream (private)
|
|
35
|
-
uses: actions/checkout@v4
|
|
36
|
-
with:
|
|
37
|
-
repository: ${{ secrets.UPSTREAM_REPO }}
|
|
38
|
-
token: ${{ secrets.UPSTREAM_TOKEN }}
|
|
39
|
-
path: upstream
|
|
40
|
-
# Sparse-checkout only the bits we mirror — saves bandwidth
|
|
41
|
-
# and surfaces the intent.
|
|
42
|
-
sparse-checkout: |
|
|
43
|
-
client/sub_pool_client
|
|
44
|
-
examples/hello.py
|
|
45
|
-
sparse-checkout-cone-mode: false
|
|
46
|
-
|
|
47
|
-
- name: Apply sync
|
|
48
|
-
run: |
|
|
49
|
-
set -euo pipefail
|
|
50
|
-
# SDK module. `_version.py` gets regenerated by hatch-vcs at
|
|
51
|
-
# build time — never carry the upstream-baked one over.
|
|
52
|
-
rm -rf sub_pool_client
|
|
53
|
-
cp -R upstream/client/sub_pool_client sub_pool_client
|
|
54
|
-
rm -f sub_pool_client/_version.py
|
|
55
|
-
# Claude example. `codex_hello.py` is mirror-only — leave it.
|
|
56
|
-
cp upstream/examples/hello.py examples/hello.py
|
|
57
|
-
rm -rf upstream
|
|
58
|
-
|
|
59
|
-
- name: Open PR if dirty
|
|
60
|
-
env:
|
|
61
|
-
GH_TOKEN: ${{ github.token }}
|
|
62
|
-
run: |
|
|
63
|
-
set -euo pipefail
|
|
64
|
-
if git diff --quiet; then
|
|
65
|
-
echo "no upstream changes — nothing to sync"
|
|
66
|
-
exit 0
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
DATE=$(date -u +%Y-%m-%d)
|
|
70
|
-
BRANCH="sync/$DATE"
|
|
71
|
-
# Avoid colliding with an existing branch if the workflow ran
|
|
72
|
-
# earlier today (e.g., on cron and again via workflow_dispatch).
|
|
73
|
-
if git ls-remote --exit-code --heads origin "$BRANCH"; then
|
|
74
|
-
BRANCH="sync/$(date -u +%Y-%m-%dT%H-%M)"
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
git config user.name "sub-pool-sync[bot]"
|
|
78
|
-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
79
|
-
git checkout -b "$BRANCH"
|
|
80
|
-
git add -A
|
|
81
|
-
git commit -m "Sync from upstream $DATE
|
|
82
|
-
|
|
83
|
-
Pulls latest \`sub_pool_client/\` + \`examples/hello.py\` from
|
|
84
|
-
upstream main. \`meta/\`, \`examples/codex_hello.py\`,
|
|
85
|
-
\`pyproject.toml\`, \`.github/\` and the mirror README are
|
|
86
|
-
mirror-owned and untouched."
|
|
87
|
-
git push origin "$BRANCH"
|
|
88
|
-
|
|
89
|
-
gh pr create \
|
|
90
|
-
--title "Sync from upstream $DATE" \
|
|
91
|
-
--body "Automated sync of \`sub_pool_client/\` + \`examples/hello.py\` from upstream main.
|
|
92
|
-
|
|
93
|
-
Merge to release the upstream changes; tag a \`v*\` afterwards to publish to PyPI."
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|