uro-cli 0.12.0__tar.gz → 0.14.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.
- {uro_cli-0.12.0 → uro_cli-0.14.0}/PKG-INFO +3 -3
- {uro_cli-0.12.0 → uro_cli-0.14.0}/pyproject.toml +3 -3
- {uro_cli-0.12.0 → uro_cli-0.14.0}/uro_cli/main.py +42 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/.gitignore +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/LICENSE +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/README.md +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/tests/test_cli_scaffold.py +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/tests/test_connect.py +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/tests/test_registry_router.py +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/tests/test_wiring.py +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/uro_cli/__init__.py +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/uro_cli/py.typed +0 -0
- {uro_cli-0.12.0 → uro_cli-0.14.0}/uro_cli/wiring.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: uro-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.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.
|
|
16
|
-
Requires-Dist: uro-server==0.
|
|
15
|
+
Requires-Dist: uro-core[llm,postgres]==0.14.0
|
|
16
|
+
Requires-Dist: uro-server==0.14.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.
|
|
3
|
+
version = "0.14.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.
|
|
17
|
-
"uro-server==0.
|
|
16
|
+
"uro-core[postgres,llm]==0.14.0",
|
|
17
|
+
"uro-server==0.14.0",
|
|
18
18
|
"typer>=0.27.2",
|
|
19
19
|
"rich>=13.9",
|
|
20
20
|
"websockets>=16.1",
|
|
@@ -70,6 +70,9 @@ policy_app = typer.Typer(
|
|
|
70
70
|
no_args_is_help=True,
|
|
71
71
|
help="Which emergent world state play may create — the instance's extraction policy (D-49).",
|
|
72
72
|
)
|
|
73
|
+
memory_app = typer.Typer(
|
|
74
|
+
no_args_is_help=True, help="Semantic memory — the beat index recall searches (docs/04)."
|
|
75
|
+
)
|
|
73
76
|
app.add_typer(db_app, name="db")
|
|
74
77
|
app.add_typer(world_app, name="world")
|
|
75
78
|
app.add_typer(branch_app, name="branch")
|
|
@@ -81,6 +84,7 @@ provider_app.add_typer(credential_app, name="credential")
|
|
|
81
84
|
app.add_typer(outbox_app, name="outbox")
|
|
82
85
|
app.add_typer(ruleset_app, name="ruleset")
|
|
83
86
|
app.add_typer(policy_app, name="extraction-policy")
|
|
87
|
+
app.add_typer(memory_app, name="memory")
|
|
84
88
|
|
|
85
89
|
# The engine roles a connection can back (resolved by the ProviderRouter) — shared with the server.
|
|
86
90
|
_ROLES = tuple(sorted(ROLES))
|
|
@@ -855,6 +859,44 @@ def _server_post(server: str, path: str, token: str, body: dict[str, Any] | None
|
|
|
855
859
|
raise typer.Exit(1) from exc
|
|
856
860
|
|
|
857
861
|
|
|
862
|
+
@memory_app.command("reembed")
|
|
863
|
+
def memory_reembed(
|
|
864
|
+
world: str = typer.Option(None, "--world", help="one world (id or name); default every world"),
|
|
865
|
+
) -> None:
|
|
866
|
+
"""Re-embed beat memories as the player's intent with the narration (D-75). Run it once after
|
|
867
|
+
upgrading past 0.12, and after importing an older bundle: memories embedded the old way are
|
|
868
|
+
recalled worse in an index that mixes both. It embeds with the registry's `embedder` role, so
|
|
869
|
+
run it on the worlds played with that embedder (`--world` to pick them); a memory whose stored
|
|
870
|
+
vector has another dimension is skipped, never mixed in. Idempotent; one embedding per memory,
|
|
871
|
+
metered like any other call."""
|
|
872
|
+
|
|
873
|
+
async def _run() -> None:
|
|
874
|
+
store = build_store()
|
|
875
|
+
await connect_store(store)
|
|
876
|
+
try:
|
|
877
|
+
world_id = (await _world_or_exit(store, world)).world_id if world else None
|
|
878
|
+
router = await build_router_from_registry(store)
|
|
879
|
+
if router is None:
|
|
880
|
+
raise ValueError("no model registry: bind an embedder first (`uro provider bind`)")
|
|
881
|
+
router.recorder = store.record_llm_call # metered like any other call (D-66)
|
|
882
|
+
|
|
883
|
+
async def embed(texts: list[str]) -> list[list[float]]:
|
|
884
|
+
return await router.embed("embedder", texts)
|
|
885
|
+
|
|
886
|
+
n, skipped = await store.reembed_memories(embed, world_id=world_id)
|
|
887
|
+
finally:
|
|
888
|
+
await store.close()
|
|
889
|
+
typer.echo(f"re-embedded {n} memor{'y' if n == 1 else 'ies'}")
|
|
890
|
+
if skipped:
|
|
891
|
+
typer.echo(
|
|
892
|
+
f"skipped {skipped}: their vectors have another dimension than the registry's "
|
|
893
|
+
"embedder (a world played with a different embedder; leave it, or use --world)",
|
|
894
|
+
err=True,
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
_run_async(_run)
|
|
898
|
+
|
|
899
|
+
|
|
858
900
|
@outbox_app.command("status")
|
|
859
901
|
def outbox_status() -> None:
|
|
860
902
|
"""How many committed beats are waiting to be published."""
|
|
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
|