albus-cli 0.3.0__tar.gz → 0.4.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 (52) hide show
  1. {albus_cli-0.3.0 → albus_cli-0.4.0}/PKG-INFO +8 -2
  2. {albus_cli-0.3.0 → albus_cli-0.4.0}/README.md +6 -0
  3. {albus_cli-0.3.0 → albus_cli-0.4.0}/pyproject.toml +2 -2
  4. albus_cli-0.4.0/src/albus_cli/commands/models.py +19 -0
  5. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/sessions.py +5 -4
  6. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/main.py +2 -0
  7. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/conftest.py +14 -0
  8. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_cli.py +2 -2
  9. albus_cli-0.4.0/tests/test_models.py +26 -0
  10. {albus_cli-0.3.0 → albus_cli-0.4.0}/uv.lock +5 -5
  11. {albus_cli-0.3.0 → albus_cli-0.4.0}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
  12. {albus_cli-0.3.0 → albus_cli-0.4.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  13. {albus_cli-0.3.0 → albus_cli-0.4.0}/.github/pull_request_template.md +0 -0
  14. {albus_cli-0.3.0 → albus_cli-0.4.0}/.github/workflows/close-pull-requests.yml +0 -0
  15. {albus_cli-0.3.0 → albus_cli-0.4.0}/.gitignore +0 -0
  16. {albus_cli-0.3.0 → albus_cli-0.4.0}/AGENTS.md +0 -0
  17. {albus_cli-0.3.0 → albus_cli-0.4.0}/CONTRIBUTING.md +0 -0
  18. {albus_cli-0.3.0 → albus_cli-0.4.0}/LICENSE +0 -0
  19. {albus_cli-0.3.0 → albus_cli-0.4.0}/Makefile +0 -0
  20. {albus_cli-0.3.0 → albus_cli-0.4.0}/RELEASING.md +0 -0
  21. {albus_cli-0.3.0 → albus_cli-0.4.0}/SECURITY.md +0 -0
  22. {albus_cli-0.3.0 → albus_cli-0.4.0}/install.ps1 +0 -0
  23. {albus_cli-0.3.0 → albus_cli-0.4.0}/install.sh +0 -0
  24. {albus_cli-0.3.0 → albus_cli-0.4.0}/pyrightconfig.json +0 -0
  25. {albus_cli-0.3.0 → albus_cli-0.4.0}/setup.sh +0 -0
  26. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/__init__.py +0 -0
  27. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/__main__.py +0 -0
  28. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/client.py +0 -0
  29. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/__init__.py +0 -0
  30. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/agents.py +0 -0
  31. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/auth.py +0 -0
  32. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/invites.py +0 -0
  33. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/secrets.py +0 -0
  34. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/status.py +0 -0
  35. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/commands/tokens.py +0 -0
  36. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/context.py +0 -0
  37. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/credentials.py +0 -0
  38. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/docs.py +0 -0
  39. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/oauth.py +0 -0
  40. {albus_cli-0.3.0 → albus_cli-0.4.0}/src/albus_cli/output.py +0 -0
  41. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/__init__.py +0 -0
  42. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_auth.py +0 -0
  43. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_credentials.py +0 -0
  44. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_health.py +0 -0
  45. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_invites.py +0 -0
  46. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_oauth.py +0 -0
  47. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_status.py +0 -0
  48. {albus_cli-0.3.0 → albus_cli-0.4.0}/tests/test_tokens.py +0 -0
  49. {albus_cli-0.3.0 → albus_cli-0.4.0}/tools/check +0 -0
  50. {albus_cli-0.3.0 → albus_cli-0.4.0}/tools/mirror-release +0 -0
  51. {albus_cli-0.3.0 → albus_cli-0.4.0}/tools/publish +0 -0
  52. {albus_cli-0.3.0 → albus_cli-0.4.0}/tools/release_state.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: albus-cli
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Command-line client for the Albus REST API
5
5
  Project-URL: Homepage, https://github.com/albusgroup/albus-cli
6
6
  Project-URL: Repository, https://github.com/albusgroup/albus-cli
@@ -9,7 +9,7 @@ Author: Albus
9
9
  License-Expression: MIT
10
10
  License-File: LICENSE
11
11
  Requires-Python: >=3.11
12
- Requires-Dist: albus-sdk==0.8.0
12
+ Requires-Dist: albus-sdk==0.9.0
13
13
  Requires-Dist: typer<0.28,>=0.26.8
14
14
  Description-Content-Type: text/markdown
15
15
 
@@ -130,8 +130,14 @@ albus tokens get "$id"
130
130
  albus tokens delete "$id"
131
131
 
132
132
  albus invites create teammate@example.com
133
+
134
+ albus models list
133
135
  ```
134
136
 
137
+ `models list` gives the model names `sessions run --model` takes, each with
138
+ the provider it runs on — which is the provider the `--credential` secret has
139
+ to be for.
140
+
135
141
  `tokens create` prints the only copy of the key value the API ever returns;
136
142
  `list` and `get` return metadata alone.
137
143
 
@@ -115,8 +115,14 @@ albus tokens get "$id"
115
115
  albus tokens delete "$id"
116
116
 
117
117
  albus invites create teammate@example.com
118
+
119
+ albus models list
118
120
  ```
119
121
 
122
+ `models list` gives the model names `sessions run --model` takes, each with
123
+ the provider it runs on — which is the provider the `--credential` secret has
124
+ to be for.
125
+
120
126
  `tokens create` prints the only copy of the key value the API ever returns;
121
127
  `list` and `get` return metadata alone.
122
128
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "albus-cli"
7
- version = "0.3.0"
7
+ version = "0.4.0"
8
8
  description = "Command-line client for the Albus REST API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -13,7 +13,7 @@ authors = [{ name = "Albus" }]
13
13
  dependencies = [
14
14
  # Pinned, not floated: the published CLI states the one SDK version it was
15
15
  # tested against, and bumping it is a reviewed edit made when releasing.
16
- "albus-sdk==0.8.0",
16
+ "albus-sdk==0.9.0",
17
17
  "typer>=0.26.8,<0.28",
18
18
  ]
19
19
 
@@ -0,0 +1,19 @@
1
+ """`albus models` — the models a session can run on.
2
+
3
+ The name a `sessions run` passes to `--model` has to be one of these, and
4
+ the pair names the provider it runs on, which is the credential
5
+ `--credential` has to carry.
6
+ """
7
+
8
+ import typer
9
+
10
+ from albus_cli.context import sdk
11
+ from albus_cli.output import emit
12
+
13
+ app = typer.Typer(no_args_is_help=True, help="List supported models.")
14
+
15
+
16
+ @app.command("list")
17
+ def list_models(ctx: typer.Context) -> None:
18
+ """List the supported models and the provider each runs on."""
19
+ emit(sdk(ctx).models.list_models())
@@ -176,7 +176,8 @@ def run(
176
176
  int | None,
177
177
  typer.Option(
178
178
  "--wait-timeout",
179
- help="Seconds to block while waiting. Omit to wait indefinitely.",
179
+ help="Seconds to block while waiting. Omit to use the "
180
+ "server default.",
180
181
  ),
181
182
  ] = None,
182
183
  ) -> None:
@@ -199,9 +200,9 @@ def run(
199
200
  agent_name=agent_name,
200
201
  agent=agent,
201
202
  idempotency_key=idempotency_key,
202
- # The server waits whenever the parameter is present, and 0 is
203
- # its unbounded wait.
204
- wait_timeout_seconds=(wait_timeout or 0) if wait else None,
203
+ # Omit the parameter to use the server's default wait; 0 returns
204
+ # immediately after the run is accepted.
205
+ wait_timeout_seconds=wait_timeout if wait else 0,
205
206
  )
206
207
  result = response.result.model_dump(mode="json", exclude_none=True)
207
208
  # The server names the invocation's effective key in a header, and the
@@ -15,6 +15,7 @@ from albus_cli.commands import (
15
15
  agents,
16
16
  auth,
17
17
  invites,
18
+ models,
18
19
  secrets,
19
20
  sessions,
20
21
  status,
@@ -39,6 +40,7 @@ app.add_typer(secrets.app, name="secrets")
39
40
  app.add_typer(agents.app, name="agents")
40
41
  app.add_typer(tokens.app, name="tokens")
41
42
  app.add_typer(invites.app, name="invites")
43
+ app.add_typer(models.app, name="models")
42
44
  app.command("login")(auth.login)
43
45
  app.command("logout")(auth.logout)
44
46
  app.command("whoami")(auth.whoami)
@@ -124,6 +124,19 @@ class FakeAuth:
124
124
  )
125
125
 
126
126
 
127
+ @dataclass
128
+ class FakeModels:
129
+ calls: list[Call]
130
+
131
+ def list_models(self, **kwargs: Any) -> models.ListModelsResponse:
132
+ self.calls.append(Call("list_models", kwargs))
133
+ return models.ListModelsResponse(
134
+ models=[
135
+ models.ModelMeta(name="claude-opus-4-8", provider="anthropic")
136
+ ]
137
+ )
138
+
139
+
127
140
  @dataclass
128
141
  class FakeAlbus:
129
142
  init_kwargs: list[dict[str, Any]] = field(default_factory=list)
@@ -136,6 +149,7 @@ class FakeAlbus:
136
149
  self.tokens = FakeTokens(self.calls)
137
150
  self.health = FakeHealth(self.calls)
138
151
  self.invites = FakeInvites(self.calls)
152
+ self.models = FakeModels(self.calls)
139
153
 
140
154
  def __call__(self, **kwargs: Any) -> "FakeAlbus":
141
155
  self.init_kwargs.append(kwargs)
@@ -41,7 +41,7 @@ def test_run_builds_agent_config_from_flags(albus: FakeAlbus) -> None:
41
41
  assert call.name == "run_session"
42
42
  assert call.kwargs["id"] == "s1"
43
43
  assert call.kwargs["user_prompt"] == "hello"
44
- assert call.kwargs["wait_timeout_seconds"] == 0
44
+ assert call.kwargs["wait_timeout_seconds"] is None
45
45
  agent = call.kwargs["agent"]
46
46
  assert agent.model.name == "gemini-3.6-flash"
47
47
  assert agent.model.provider is not None
@@ -89,7 +89,7 @@ def test_wait_flags_map_to_the_wait_timeout(albus: FakeAlbus) -> None:
89
89
  ]
90
90
 
91
91
  assert runner.invoke(app, [*args, "--no-wait"]).exit_code == 0
92
- assert albus.calls[0].kwargs["wait_timeout_seconds"] is None
92
+ assert albus.calls[0].kwargs["wait_timeout_seconds"] == 0
93
93
 
94
94
  assert runner.invoke(app, [*args, "--wait-timeout", "5"]).exit_code == 0
95
95
  assert albus.calls[1].kwargs["wait_timeout_seconds"] == 5
@@ -0,0 +1,26 @@
1
+ """`albus models list` is where a reader finds the name `sessions run
2
+ --model` takes, so it has to answer with the API key that a run uses
3
+ rather than the browser session `/tokens` needs."""
4
+
5
+ import json
6
+
7
+ from typer.testing import CliRunner
8
+
9
+ from albus_cli.main import app
10
+ from tests.conftest import FakeAlbus
11
+
12
+ runner = CliRunner()
13
+
14
+
15
+ def test_list_prints_the_models_and_providers(albus: FakeAlbus) -> None:
16
+ result = runner.invoke(app, ["models", "list"])
17
+
18
+ assert result.exit_code == 0, result.output
19
+ assert albus.calls[0].name == "list_models"
20
+ listed = json.loads(result.stdout)["models"][0]
21
+ assert listed == {"name": "claude-opus-4-8", "provider": "anthropic"}
22
+
23
+
24
+ def test_list_uses_the_api_key(albus: FakeAlbus) -> None:
25
+ assert runner.invoke(app, ["models", "list"]).exit_code == 0
26
+ assert albus.init_kwargs[0]["api_key"] == "test-key"
@@ -8,7 +8,7 @@ resolution-markers = [
8
8
 
9
9
  [[package]]
10
10
  name = "albus-cli"
11
- version = "0.3.0"
11
+ version = "0.4.0"
12
12
  source = { editable = "." }
13
13
  dependencies = [
14
14
  { name = "albus-sdk" },
@@ -24,7 +24,7 @@ dev = [
24
24
 
25
25
  [package.metadata]
26
26
  requires-dist = [
27
- { name = "albus-sdk", specifier = "==0.8.0" },
27
+ { name = "albus-sdk", specifier = "==0.9.0" },
28
28
  { name = "typer", specifier = ">=0.26.8,<0.28" },
29
29
  ]
30
30
 
@@ -37,16 +37,16 @@ dev = [
37
37
 
38
38
  [[package]]
39
39
  name = "albus-sdk"
40
- version = "0.8.0"
40
+ version = "0.9.0"
41
41
  source = { registry = "https://pypi.org/simple" }
42
42
  dependencies = [
43
43
  { name = "httpcore" },
44
44
  { name = "httpx" },
45
45
  { name = "pydantic" },
46
46
  ]
47
- sdist = { url = "https://files.pythonhosted.org/packages/ca/86/c891c6fdd1ad4c34e4f49af973af09c23058288ae36e4ed89f58542cd3d3/albus_sdk-0.8.0.tar.gz", hash = "sha256:18609e42cbdbbd80fa27bd78e951cfff6da208f61b31b54a3c3efc8ae8a37856", size = 66873, upload-time = "2026-08-12T22:08:58.186Z" }
47
+ sdist = { url = "https://files.pythonhosted.org/packages/35/52/3dfdcc881a2d0a99adc6f9c9cb4c64b9616aa9cb0dd10f812aa5f3471661/albus_sdk-0.9.0.tar.gz", hash = "sha256:0edfe7fd732d04e87d440e38a8f296ddc3eb5e6f8ef77335c409b1873313ba74", size = 67010, upload-time = "2026-08-14T15:24:58.288Z" }
48
48
  wheels = [
49
- { url = "https://files.pythonhosted.org/packages/43/5a/4392771345d808c5f44a78cffef7532d486fa976bc00072df6b6b3b69365/albus_sdk-0.8.0-py3-none-any.whl", hash = "sha256:1226da9d23f3530e060a0081ce5e1d7de1f023e2b9e2056b66784757996a028c", size = 95910, upload-time = "2026-08-12T22:08:57.18Z" },
49
+ { url = "https://files.pythonhosted.org/packages/da/20/13f398123fd17d653b84b1160409378302a9fa8f0c6600719d7cc782ef6d/albus_sdk-0.9.0-py3-none-any.whl", hash = "sha256:cc7736e37b03562263e620293e67286c2c58ee470067440c274437e1104e0581", size = 98238, upload-time = "2026-08-14T15:24:57.15Z" },
50
50
  ]
51
51
 
52
52
  [[package]]
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
File without changes
File without changes
File without changes