trefoil-cli 0.8.0__tar.gz → 0.9.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trefoil-cli
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: CLI for the trefoil agent server
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: pyyaml>=6
@@ -53,7 +53,7 @@ import yaml
53
53
 
54
54
  DEFAULT_SERVER = "http://localhost:8080"
55
55
  EXAMPLES_API = "https://api.github.com/repos/alto-se/trefoil/contents/examples"
56
- ENGINE_IMAGE = "ghcr.io/alto-se/trefoil-api:latest"
56
+ ENGINE_REPO = "ghcr.io/alto-se/trefoil-api"
57
57
 
58
58
 
59
59
  class Ref:
@@ -722,6 +722,12 @@ def cli_version():
722
722
  return "unknown"
723
723
 
724
724
 
725
+ def engine_image():
726
+ """The API image released with this CLI (same version), or :latest when unknown."""
727
+ version = cli_version()
728
+ return f"{ENGINE_REPO}:{'latest' if version == 'unknown' else version}"
729
+
730
+
725
731
  def main():
726
732
  parser = argparse.ArgumentParser(prog="trefoil", description="trefoil <domain> <command> [args]")
727
733
  parser.add_argument("--version", action="version", version=f"%(prog)s {cli_version()}")
@@ -761,7 +767,7 @@ def main():
761
767
  engine_start.add_argument("--aws-region", metavar="REGION",
762
768
  help="AWS region for bedrock (default: $AWS_REGION or the profile's region)")
763
769
  engine_start.add_argument("--port", type=int, default=8080, help="host port to publish (default: 8080)")
764
- engine_start.add_argument("--image", default=ENGINE_IMAGE, help=f"API image (default: {ENGINE_IMAGE})")
770
+ engine_start.add_argument("--image", default=engine_image(), help=f"API image (default: {engine_image()})")
765
771
  engine_start.add_argument("--name", default="trefoil-api", help="container name (default: trefoil-api)")
766
772
  engine_start.add_argument("--volume", default="trefoil-data",
767
773
  help="docker volume (or host path) for the data dir (default: trefoil-data)")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "trefoil-cli"
3
- version = "0.8.0"
3
+ version = "0.9.0"
4
4
  description = "CLI for the trefoil agent server"
5
5
  requires-python = ">=3.10"
6
6
  dependencies = ["pyyaml>=6"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trefoil-cli
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: CLI for the trefoil agent server
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: pyyaml>=6
File without changes