uro-cli 0.13.0__tar.gz → 0.15.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.5
2
2
  Name: uro-cli
3
- Version: 0.13.0
3
+ Version: 0.15.0
4
4
  Summary: Uro Engine reference client — play, dry-run, and dev tools against the engine
5
5
  Project-URL: Homepage, https://github.com/cupskeee/uro
6
6
  Project-URL: Repository, https://github.com/cupskeee/uro
@@ -12,8 +12,8 @@ Requires-Python: >=3.12
12
12
  Requires-Dist: python-dotenv>=1.0
13
13
  Requires-Dist: rich>=13.9
14
14
  Requires-Dist: typer>=0.27.2
15
- Requires-Dist: uro-core[llm,postgres]==0.13.0
16
- Requires-Dist: uro-server==0.13.0
15
+ Requires-Dist: uro-core[llm,postgres]==0.15.0
16
+ Requires-Dist: uro-server==0.15.0
17
17
  Requires-Dist: websockets>=16.1
18
18
  Description-Content-Type: text/markdown
19
19
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uro-cli"
3
- version = "0.13.0"
3
+ version = "0.15.0"
4
4
  description = "Uro Engine reference client — play, dry-run, and dev tools against the engine"
5
5
  license = "MIT"
6
6
  license-files = ["LICENSE"]
@@ -13,8 +13,8 @@ requires-python = ">=3.12"
13
13
  # pair a new uro-cli with an old uro-core; `just release` bumps all three together, and the
14
14
  # `{workspace = true}` sources make a drifted pin fail `uv sync` locally.
15
15
  dependencies = [
16
- "uro-core[postgres,llm]==0.13.0",
17
- "uro-server==0.13.0",
16
+ "uro-core[postgres,llm]==0.15.0",
17
+ "uro-server==0.15.0",
18
18
  "typer>=0.27.2",
19
19
  "rich>=13.9",
20
20
  "websockets>=16.1",
@@ -598,7 +598,8 @@ def serve(
598
598
  ),
599
599
  ) -> None:
600
600
  """Run the Uro server (docs/08): a thin FastAPI shell over the engine. Each --token maps to
601
- a participant; with no --token, a single 'local' token binds player-1 (the solo dev loop).
601
+ a participant; with no --token, a single 'local' token binds player-1 (the solo dev loop, on
602
+ 127.0.0.1 only: binding any other host needs --token).
602
603
 
603
604
  Each campaign plays under the ruleset it pinned, as with `uro play`: one server hosts d20,
604
605
  PbtA and Uro Pool campaigns side by side. `--ruleset` sets the default for unpinned ones."""
@@ -607,6 +608,14 @@ def serve(
607
608
  from uro_core.session import PartyArbiter, ProposalWindowArbiter, TurnArbiter, VoteArbiter
608
609
  from uro_server.app import create_app, engine_deps
609
610
 
611
+ # The default 'local' token is a guessable name, fine on loopback (the solo dev loop) and
612
+ # nowhere else: anyone who can reach a public bind could play as player-1 with it (D-94 review).
613
+ if not token and host not in ("127.0.0.1", "localhost", "::1"):
614
+ typer.echo(
615
+ f"error: binding {host} needs --token: the default 'local' token is only for 127.0.0.1",
616
+ err=True,
617
+ )
618
+ raise typer.Exit(2)
610
619
  toks = token or ["local"]
611
620
  # `TOK=participant` names the participant explicitly (gap G-16 — token order was load-bearing
612
621
  # config); a bare `TOK` falls back to positional player-1..N.
@@ -1571,9 +1580,15 @@ def campaign_new(
1571
1580
  def campaign_time_skip(
1572
1581
  campaign_id: str,
1573
1582
  days: int = typer.Option(..., "--days", min=1, help="in-fiction days to advance"),
1583
+ downtime: bool = typer.Option(
1584
+ True,
1585
+ "--downtime/--no-downtime",
1586
+ help="rest the sheets and mark a skip (default), or pass the days in play (D-80)",
1587
+ ),
1574
1588
  ) -> None:
1575
1589
  """Advance time ON the campaign's own branch and fire the world's downtime agenda rules (D-33).
1576
- To skip time on a NEW branch instead, use `uro branch fork --time-skip-days`."""
1590
+ `--no-downtime` passes the days in play instead: the world's rules and agendas react, nothing
1591
+ rests (D-80). To skip time on a NEW branch, use `uro branch fork --time-skip-days`."""
1577
1592
 
1578
1593
  async def _run() -> None:
1579
1594
  store = build_store()
@@ -1584,11 +1599,15 @@ def campaign_time_skip(
1584
1599
  # and settings decide what the downtime means (D-63)
1585
1600
  ruleset = await _time_skip_ruleset(registry.resolve_for_campaign(store, c))
1586
1601
  engine = Engine(store, build_router("stub", None), ruleset=ruleset)
1587
- await engine.agenda_tick(c.branch_id, days)
1602
+ if downtime:
1603
+ await engine.agenda_tick(c.branch_id, days)
1604
+ else:
1605
+ await engine.pass_time(c, days, reason="operator")
1588
1606
  day = await store.current_world_time(c.branch_id)
1589
1607
  finally:
1590
1608
  await store.close()
1591
- typer.echo(f"advanced {days} day(s); the campaign is now on day {day}")
1609
+ how = "" if downtime else " in play"
1610
+ typer.echo(f"advanced {days} day(s){how}; the campaign is now on day {day}")
1592
1611
 
1593
1612
  _run_async(_run)
1594
1613
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes