evo-cli 0.29.1__tar.gz → 0.30.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.
- {evo_cli-0.29.1 → evo_cli-0.30.0}/PKG-INFO +4 -2
- {evo_cli-0.29.1 → evo_cli-0.30.0}/README.md +3 -1
- evo_cli-0.30.0/evo_cli/VERSION +1 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/__init__.py +1 -1
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_dag.py +23 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_render.py +34 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/edit.py +17 -15
- evo_cli-0.30.0/evo_cli/commands/harness/show.py +144 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/views.py +11 -5
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli.egg-info/PKG-INFO +4 -2
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli.egg-info/SOURCES.txt +1 -0
- evo_cli-0.30.0/tests/test_harness_show.py +267 -0
- evo_cli-0.29.1/evo_cli/VERSION +0 -1
- evo_cli-0.29.1/evo_cli/commands/harness/show.py +0 -68
- {evo_cli-0.29.1 → evo_cli-0.30.0}/Containerfile +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/HISTORY.md +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/LICENSE +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/MANIFEST.in +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/__main__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/base.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/cli.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/agent_toy.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/claude_code.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/cloudflare.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/cred.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/download.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/fix_claude.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/gdrive.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/gh.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_git.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_hub.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_mirror.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_model.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_mutate.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_paths.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/_server.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/check.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/clone.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/pull.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/serve.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/index-Cs7hXRPJ.css +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/index-CuNOlaH7.js +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/harness/web/index.html +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/hwid.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/hwid_reset.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/image.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/localproxy.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/mcp.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/miniconda.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/netcheck.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/ngrok.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/opencode.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/openvpn.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/plantuml.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/_dns.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/_dpi.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/_hosts.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/_probe.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/check.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/fix.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/probe.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/route/status.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/serp.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/site2s.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/ssh.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/storage.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/sysmon.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/tts.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/update.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/commands/wifi.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/console.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/doctor.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/google_oauth.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/migrate.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/oauth_flow.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/registry.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/store.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/credentials/sync.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/align.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/core.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/creds.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/errors.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/gemini.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/imaging/ncnn.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/mcp_registry.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/openvpn.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/serp/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/serp/client.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/serp/creds.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/serp/errors.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/serp/install.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/serp/render.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/chunking.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/core.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/creds.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/errors.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/gemini.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/http.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/openai.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/player.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli/tts/vbee.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli.egg-info/dependency_links.txt +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli.egg-info/entry_points.txt +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli.egg-info/requires.txt +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/evo_cli.egg-info/top_level.txt +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/pyproject.toml +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/setup.cfg +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/__init__.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/fake_evo_agents.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/fixtures/hub/contract-0.2.0.json +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/fixtures/hub/mirror-demo.yaml +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_agent_toy.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_claude_code.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_cli.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_console.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_cred.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_download.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_fix_claude.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_gdrive.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_gh.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_harness.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_harness_clone.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_harness_dag.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_harness_hub.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_image.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_mcp.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_ngrok.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_opencode.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_openvpn.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_plantuml.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_route.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_serp.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_storage.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_sysmon.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_tts.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_update.py +0 -0
- {evo_cli-0.29.1 → evo_cli-0.30.0}/tests/test_wifi.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evo_cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.30.0
|
|
4
4
|
Summary: Evolution CLI - a developer toolbox for setting up dev machines
|
|
5
5
|
Author: maycuatroi
|
|
6
6
|
Project-URL: Homepage, https://github.com/maycuatroi/evo-cli
|
|
@@ -415,7 +415,9 @@ evo harness serve # dashboard on http://127.0.0.1:8788
|
|
|
415
415
|
evo harness repos # repos in the manifest, with branch and dirty state
|
|
416
416
|
evo harness seams # contract seams; --graph for the owner -> consumer DAG
|
|
417
417
|
evo harness plans # progress across every exec-plan
|
|
418
|
-
evo harness show <plan>
|
|
418
|
+
evo harness show <plan> # every section, open questions with status and blocking
|
|
419
|
+
evo harness show <plan> --step 3 # one step in full: what, verify, note, acceptance, evidence
|
|
420
|
+
evo harness step <plan> --no-input # the step board: repo, status, depends_on, title
|
|
419
421
|
evo harness check <plan> [--fetch] # what the plan claims vs what git says
|
|
420
422
|
evo harness graph <plan>:steps # the same DAG as an adjacency list
|
|
421
423
|
evo harness clone # clone every declared repo into its declared path
|
|
@@ -382,7 +382,9 @@ evo harness serve # dashboard on http://127.0.0.1:8788
|
|
|
382
382
|
evo harness repos # repos in the manifest, with branch and dirty state
|
|
383
383
|
evo harness seams # contract seams; --graph for the owner -> consumer DAG
|
|
384
384
|
evo harness plans # progress across every exec-plan
|
|
385
|
-
evo harness show <plan>
|
|
385
|
+
evo harness show <plan> # every section, open questions with status and blocking
|
|
386
|
+
evo harness show <plan> --step 3 # one step in full: what, verify, note, acceptance, evidence
|
|
387
|
+
evo harness step <plan> --no-input # the step board: repo, status, depends_on, title
|
|
386
388
|
evo harness check <plan> [--fetch] # what the plan claims vs what git says
|
|
387
389
|
evo harness graph <plan>:steps # the same DAG as an adjacency list
|
|
388
390
|
evo harness clone # clone every declared repo into its declared path
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.30.0
|
|
@@ -18,7 +18,7 @@ def harness_group():
|
|
|
18
18
|
evo harness repos repos in the manifest, with git state
|
|
19
19
|
evo harness seams contract seams: owner, consumers, verify command
|
|
20
20
|
evo harness plans progress across every exec-plan
|
|
21
|
-
evo harness show <plan> read one plan
|
|
21
|
+
evo harness show <plan> read one plan (--step <id> prints one step in full)
|
|
22
22
|
evo harness graph <plan> print a DAG as an adjacency list
|
|
23
23
|
evo harness check <plan> check what the plan claims against real git
|
|
24
24
|
evo harness step <plan> 3 done mark a step (--evidence and --note append)
|
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
import itertools
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
+
import rich_click as click
|
|
7
|
+
|
|
6
8
|
from evo_cli.commands.harness._model import Plan, cluster, load_seams, step_title, tone_of
|
|
7
9
|
|
|
8
10
|
CLUSTER_REPO = "__cluster__"
|
|
@@ -285,6 +287,17 @@ def step_key(entry: dict, index: int) -> str:
|
|
|
285
287
|
return str(index)
|
|
286
288
|
|
|
287
289
|
|
|
290
|
+
def resolve_step(plan: Plan, key) -> int:
|
|
291
|
+
"""Index of the step whose key is KEY. An unknown key fails with every key the plan holds."""
|
|
292
|
+
entries = plan.items("steps")
|
|
293
|
+
wanted = str(key)
|
|
294
|
+
for index, entry in enumerate(entries):
|
|
295
|
+
if step_key(entry, index) == wanted:
|
|
296
|
+
return index
|
|
297
|
+
known = ", ".join(step_key(e, i) for i, e in enumerate(entries)) or "(the plan has no steps)"
|
|
298
|
+
raise click.ClickException(f"No step {wanted!r} in {plan.id}. Available: {known}")
|
|
299
|
+
|
|
300
|
+
|
|
288
301
|
def _as_list(value) -> list:
|
|
289
302
|
if value is None:
|
|
290
303
|
return []
|
|
@@ -293,6 +306,16 @@ def _as_list(value) -> list:
|
|
|
293
306
|
return [value]
|
|
294
307
|
|
|
295
308
|
|
|
309
|
+
def step_depends(entry: dict) -> list[str]:
|
|
310
|
+
"""Keys of the steps this one waits on, in written order, from every spelling the step graph reads."""
|
|
311
|
+
found: list[str] = []
|
|
312
|
+
for name in FORWARD_KEYS:
|
|
313
|
+
for raw in _as_list(entry.get(name)):
|
|
314
|
+
if str(raw) not in found:
|
|
315
|
+
found.append(str(raw))
|
|
316
|
+
return found
|
|
317
|
+
|
|
318
|
+
|
|
296
319
|
def plan_step_graph(plan: Plan) -> dict:
|
|
297
320
|
steps = plan.items("steps")
|
|
298
321
|
repo_entries = plan.items("repos")
|
|
@@ -31,6 +31,40 @@ def one_line(value: object, width: int) -> str:
|
|
|
31
31
|
return text if len(text) <= width else text[: max(1, width - 3)] + "..."
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
def as_text(value: object) -> str:
|
|
35
|
+
"""A plan value the way YAML spells it: booleans as true/false, lists joined, nothing as `-`."""
|
|
36
|
+
if value is None or value == "" or value == []:
|
|
37
|
+
return "-"
|
|
38
|
+
if isinstance(value, bool):
|
|
39
|
+
return "true" if value else "false"
|
|
40
|
+
if isinstance(value, (list, tuple)):
|
|
41
|
+
return ", ".join(as_text(v) for v in value)
|
|
42
|
+
return str(value)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def key_runs(keys: list[str]) -> str:
|
|
46
|
+
"""Step keys in written order, with a run of three or more consecutive integers shown as `first-last`."""
|
|
47
|
+
parts: list[str] = []
|
|
48
|
+
run: list[int] = []
|
|
49
|
+
|
|
50
|
+
def flush() -> None:
|
|
51
|
+
parts.extend([f"{run[0]}-{run[-1]}"] if len(run) >= 3 else [str(n) for n in run])
|
|
52
|
+
run.clear()
|
|
53
|
+
|
|
54
|
+
for key in keys:
|
|
55
|
+
number = int(key) if key.isascii() and key.isdigit() and str(int(key)) == key else None
|
|
56
|
+
if number is not None and run and number == run[-1] + 1:
|
|
57
|
+
run.append(number)
|
|
58
|
+
continue
|
|
59
|
+
flush()
|
|
60
|
+
if number is None:
|
|
61
|
+
parts.append(key)
|
|
62
|
+
else:
|
|
63
|
+
run.append(number)
|
|
64
|
+
flush()
|
|
65
|
+
return ", ".join(parts) or "-"
|
|
66
|
+
|
|
67
|
+
|
|
34
68
|
def title_width(reserved: int = 26) -> int:
|
|
35
69
|
return max(28, min(console.width, 140) - reserved)
|
|
36
70
|
|
|
@@ -5,7 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
import rich_click as click
|
|
6
6
|
from rich.markup import escape
|
|
7
7
|
|
|
8
|
-
from evo_cli.commands.harness._dag import step_key
|
|
8
|
+
from evo_cli.commands.harness._dag import resolve_step, step_key
|
|
9
9
|
from evo_cli.commands.harness._model import find_plan, step_title, tone_of
|
|
10
10
|
from evo_cli.commands.harness._mutate import update_item
|
|
11
11
|
from evo_cli.commands.harness._paths import find_manifest, harness_option
|
|
@@ -18,9 +18,21 @@ DEBT_STATUS = ["fixed", "open"]
|
|
|
18
18
|
QUESTION_STATUS = ["answered", "open"]
|
|
19
19
|
REPO_STATUS = ["merged", "done", "in_progress", "pending", "not-needed"]
|
|
20
20
|
|
|
21
|
-
DATE_KEY = {
|
|
21
|
+
DATE_KEY = {
|
|
22
|
+
"done": "done_at",
|
|
23
|
+
"descoped": "descoped_at",
|
|
24
|
+
"fixed": "fixed_at",
|
|
25
|
+
"answered": "answered_at",
|
|
26
|
+
"merged": "merged_at",
|
|
27
|
+
}
|
|
22
28
|
NOTE_HELP = "Append a note, on a line of its own. An existing note is kept."
|
|
23
|
-
NEXT_STATUS = {
|
|
29
|
+
NEXT_STATUS = {
|
|
30
|
+
"pending": "in_progress",
|
|
31
|
+
"blocked": "in_progress",
|
|
32
|
+
"in_progress": "done",
|
|
33
|
+
"done": "done",
|
|
34
|
+
"descoped": "descoped",
|
|
35
|
+
}
|
|
24
36
|
|
|
25
37
|
|
|
26
38
|
def _today() -> str:
|
|
@@ -58,16 +70,6 @@ def _write(manifest_path, plan_id, section, index, status, note, no_date, eviden
|
|
|
58
70
|
console.print(f" [yellow]note:[/] {escape(text)}")
|
|
59
71
|
|
|
60
72
|
|
|
61
|
-
def _resolve_step(item, key) -> int:
|
|
62
|
-
entries = item.items("steps")
|
|
63
|
-
wanted = str(key)
|
|
64
|
-
for index, entry in enumerate(entries):
|
|
65
|
-
if step_key(entry, index) == wanted:
|
|
66
|
-
return index
|
|
67
|
-
known = ", ".join(step_key(e, i) for i, e in enumerate(entries))
|
|
68
|
-
raise click.ClickException(f"No step {wanted!r} in {item.id}. Available: {known}")
|
|
69
|
-
|
|
70
|
-
|
|
71
73
|
def _pick(item, key, status):
|
|
72
74
|
"""Interactive picker, but only when questionary is installed and we own a real terminal."""
|
|
73
75
|
try:
|
|
@@ -92,7 +94,7 @@ def _pick(item, key, status):
|
|
|
92
94
|
raise click.Abort()
|
|
93
95
|
|
|
94
96
|
if status is None:
|
|
95
|
-
index =
|
|
97
|
+
index = resolve_step(item, key)
|
|
96
98
|
current = str(entries[index].get("status") or "")
|
|
97
99
|
suggested = NEXT_STATUS.get(current, STEP_STATUS[0])
|
|
98
100
|
status = questionary.select(
|
|
@@ -138,7 +140,7 @@ def step(harness_path, plan_id, key, status, note, evidence, no_date, no_input):
|
|
|
138
140
|
if key is None or status is None:
|
|
139
141
|
return
|
|
140
142
|
|
|
141
|
-
_write(manifest_path, plan_id, "steps",
|
|
143
|
+
_write(manifest_path, plan_id, "steps", resolve_step(item, key), status, note, no_date, evidence)
|
|
142
144
|
console.print()
|
|
143
145
|
step_board(find_plan(manifest_path, plan_id), highlight=key)
|
|
144
146
|
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import rich_click as click
|
|
4
|
+
import yaml
|
|
5
|
+
from rich.panel import Panel
|
|
6
|
+
from rich.text import Text
|
|
7
|
+
|
|
8
|
+
from evo_cli.commands.harness._dag import resolve_step, step_key
|
|
9
|
+
from evo_cli.commands.harness._model import SECTIONS, find_plan, plain, tone_of
|
|
10
|
+
from evo_cli.commands.harness._paths import find_manifest, harness_option
|
|
11
|
+
from evo_cli.commands.harness._render import TONE_STYLE, as_text, bar, one_line, title_width
|
|
12
|
+
from evo_cli.console import console
|
|
13
|
+
|
|
14
|
+
SECTION_TITLES = {
|
|
15
|
+
"references": "References",
|
|
16
|
+
"repos": "Repos and merge order",
|
|
17
|
+
"steps": "Steps",
|
|
18
|
+
"decisions": "Decisions",
|
|
19
|
+
"tech_debt": "Tech debt",
|
|
20
|
+
"open_questions": "Open questions",
|
|
21
|
+
}
|
|
22
|
+
HIDE_KEYS = {"status", "order", "what", "repo", "id"}
|
|
23
|
+
# Every open question says whether it blocks, even one whose author left the key out.
|
|
24
|
+
ALWAYS_SHOWN = {"open_questions": ("blocking",)}
|
|
25
|
+
|
|
26
|
+
STEP_HEAD = ("id", "title", "status", "repo", "depends_on", "blocking", "done_at")
|
|
27
|
+
STEP_BODY = ("what", "verify", "note", "acceptance", "evidence")
|
|
28
|
+
INDENT = " "
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _render_item(section: str, index: int, item: dict, full: bool) -> None:
|
|
32
|
+
status = item.get("status")
|
|
33
|
+
style = TONE_STYLE[tone_of(section, status)]
|
|
34
|
+
authored = item.get("title")
|
|
35
|
+
titled = isinstance(authored, str) and bool(authored.strip())
|
|
36
|
+
if titled:
|
|
37
|
+
head, hidden = authored.strip(), (HIDE_KEYS - {"what"}) | {"title"}
|
|
38
|
+
else:
|
|
39
|
+
head = item.get("what") or item.get("repo") or item.get("issue") or "?"
|
|
40
|
+
hidden = HIDE_KEYS | ({"issue"} if head == item.get("issue") else set())
|
|
41
|
+
label = item.get("id", item.get("order", index))
|
|
42
|
+
badge = f"[{style}]{status}[/]" if status else ""
|
|
43
|
+
if not full:
|
|
44
|
+
head = one_line(head, title_width(reserved=18))
|
|
45
|
+
console.print(f" [bold]{label:>3}[/] {head} {badge}")
|
|
46
|
+
fields = {**item, **{key: item.get(key) for key in ALWAYS_SHOWN.get(section, ())}}
|
|
47
|
+
for key, value in fields.items():
|
|
48
|
+
if key in hidden:
|
|
49
|
+
continue
|
|
50
|
+
if isinstance(value, list):
|
|
51
|
+
value = "; ".join(as_text(v) for v in value) or "-"
|
|
52
|
+
text = " ".join(as_text(value).split())
|
|
53
|
+
console.print(f" [dim]{key}:[/] {text if full else one_line(text, title_width(reserved=18))}")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _block(value: object) -> list[str]:
|
|
57
|
+
"""Lines of a value printed under its key: text keeps its line breaks, a list becomes `- ` items."""
|
|
58
|
+
if value is None or value == "" or value == []:
|
|
59
|
+
return ["-"]
|
|
60
|
+
if isinstance(value, list):
|
|
61
|
+
lines = []
|
|
62
|
+
for entry in value:
|
|
63
|
+
first, *rest = _block(entry)
|
|
64
|
+
lines.append(f"- {first}")
|
|
65
|
+
lines.extend(f" {line}" if line else "" for line in rest)
|
|
66
|
+
return lines
|
|
67
|
+
if isinstance(value, dict):
|
|
68
|
+
dumped = yaml.safe_dump(plain(value), allow_unicode=True, sort_keys=False, width=1_000_000)
|
|
69
|
+
return dumped.rstrip("\n").split("\n")
|
|
70
|
+
return as_text(value).rstrip("\n").split("\n")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _is_short(value: object) -> bool:
|
|
74
|
+
nested = isinstance(value, dict) or (isinstance(value, list) and any(isinstance(v, (dict, list)) for v in value))
|
|
75
|
+
text = as_text(value)
|
|
76
|
+
return not nested and "\n" not in text and len(text) <= 80
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _print(text: Text) -> None:
|
|
80
|
+
# Soft wrap: rich never breaks a line itself, so a verify command stays one copyable line.
|
|
81
|
+
console.print(text, soft_wrap=True)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _print_step(item, key: str) -> None:
|
|
85
|
+
index = resolve_step(item, key)
|
|
86
|
+
entry = item.items("steps")[index]
|
|
87
|
+
key = step_key(entry, index)
|
|
88
|
+
_print(Text.assemble((item.id, "bold cyan"), " step ", (key, "bold"), (f" ({item.area})", "dim")))
|
|
89
|
+
|
|
90
|
+
# Any other key the step carries is printed too: short scalars beside the head, the rest as blocks.
|
|
91
|
+
extra = [k for k in entry if k not in STEP_HEAD and k not in STEP_BODY]
|
|
92
|
+
inline = [k for k in extra if _is_short(entry[k])]
|
|
93
|
+
head = [*STEP_HEAD, *inline]
|
|
94
|
+
width = max(len(k) for k in head) + 1
|
|
95
|
+
for name in head:
|
|
96
|
+
value = as_text(entry.get(name))
|
|
97
|
+
style = TONE_STYLE[tone_of("steps", value)] if name == "status" and value != "-" else ""
|
|
98
|
+
_print(Text.assemble((f"{name + ':':<{width}} ", "dim"), (value, style)))
|
|
99
|
+
|
|
100
|
+
for name in [*STEP_BODY, *(k for k in extra if k not in inline)]:
|
|
101
|
+
_print(Text())
|
|
102
|
+
_print(Text(f"{name}:", style="bold"))
|
|
103
|
+
for line in _block(entry.get(name)):
|
|
104
|
+
_print(Text(INDENT + line if line else ""))
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@click.command("show", help="Read one exec-plan in the terminal, or one of its steps in full with --step.")
|
|
108
|
+
@harness_option
|
|
109
|
+
@click.argument("plan_id")
|
|
110
|
+
@click.option("--section", "sections", multiple=True, type=click.Choice(SECTIONS), help="Only print some sections.")
|
|
111
|
+
@click.option("--full", is_flag=True, help="Print notes verbatim instead of clipping to one line.")
|
|
112
|
+
@click.option(
|
|
113
|
+
"--step",
|
|
114
|
+
"step_id",
|
|
115
|
+
metavar="ID",
|
|
116
|
+
help="Print only this step, every field as written: what, verify, note, acceptance and evidence unclipped.",
|
|
117
|
+
)
|
|
118
|
+
def show(harness_path, plan_id, sections, full, step_id):
|
|
119
|
+
item = find_plan(find_manifest(harness_path), plan_id)
|
|
120
|
+
if step_id is not None:
|
|
121
|
+
if sections:
|
|
122
|
+
raise click.UsageError("--step prints one step; leave out --section.")
|
|
123
|
+
_print_step(item, step_id)
|
|
124
|
+
return
|
|
125
|
+
|
|
126
|
+
p = item.progress()
|
|
127
|
+
|
|
128
|
+
console.print(
|
|
129
|
+
Panel(
|
|
130
|
+
" ".join(str(item.raw.get("goal") or "").split()),
|
|
131
|
+
title=f"[bold]{item.id}[/] [dim]({item.area})[/]",
|
|
132
|
+
subtitle=f"{bar(p['steps_done'], p['steps_total'])} {p['steps_done']}/{p['steps_total']} steps "
|
|
133
|
+
f"debt: {p['debt_open']} questions: {p['questions_open']}",
|
|
134
|
+
border_style="cyan",
|
|
135
|
+
)
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
for name in sections or SECTIONS:
|
|
139
|
+
entries = item.items(name)
|
|
140
|
+
if not entries:
|
|
141
|
+
continue
|
|
142
|
+
console.print(f"\n[bold cyan]{SECTION_TITLES[name]}[/] [dim]({len(entries)})[/]")
|
|
143
|
+
for index, entry in enumerate(entries):
|
|
144
|
+
_render_item(name, index, entry, full)
|
|
@@ -2,12 +2,13 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
|
|
5
|
-
from evo_cli.commands.harness._dag import plan_repo_graph, plan_step_graph, seam_graph, step_key
|
|
5
|
+
from evo_cli.commands.harness._dag import plan_repo_graph, plan_step_graph, seam_graph, step_depends, step_key
|
|
6
6
|
from evo_cli.commands.harness._model import cluster, find_plan, load_plans, load_seams, step_title, tone_of
|
|
7
7
|
from evo_cli.commands.harness._paths import find_manifest, git, harness_option
|
|
8
8
|
from evo_cli.commands.harness._render import (
|
|
9
9
|
TONE_STYLE,
|
|
10
10
|
bar,
|
|
11
|
+
key_runs,
|
|
11
12
|
one_line,
|
|
12
13
|
print_graph,
|
|
13
14
|
print_warnings,
|
|
@@ -37,7 +38,9 @@ def plans(harness_path, area):
|
|
|
37
38
|
)
|
|
38
39
|
grid.add_row(
|
|
39
40
|
f"[bold]{item.id}[/]",
|
|
40
|
-
item.area
|
|
41
|
+
item.area
|
|
42
|
+
if item.raw.get("status") not in ("abandoned", "superseded")
|
|
43
|
+
else f"{item.area} [yellow]({item.raw['status']})[/]",
|
|
41
44
|
f"{p['steps_done']}/{p['steps_total']}",
|
|
42
45
|
f"{bar(p['steps_done'], p['steps_total'])} {p['pct']:>3}%",
|
|
43
46
|
f"{p['repos_done']}/{p['repos_total']}",
|
|
@@ -142,18 +145,21 @@ def step_board(item, highlight=None) -> None:
|
|
|
142
145
|
console.print("[dim] This plan has no steps yet.[/]")
|
|
143
146
|
return
|
|
144
147
|
|
|
145
|
-
width = title_width()
|
|
146
|
-
grid = table("", "#", "REPO", "STATUS", "STEP")
|
|
148
|
+
width = title_width(reserved=38)
|
|
149
|
+
grid = table("", "#", "REPO", "STATUS", "DEPENDS ON", "STEP")
|
|
147
150
|
for index, entry in enumerate(steps):
|
|
148
151
|
status = entry.get("status")
|
|
149
152
|
style = TONE_STYLE[tone_of("steps", status)]
|
|
150
153
|
key = step_key(entry, index)
|
|
151
154
|
marker = "[bold cyan]>[/]" if highlight is not None and key == str(highlight) else " "
|
|
155
|
+
# Nearly every step is blocking, so only the exception is marked.
|
|
156
|
+
optional = " [dim](non-blocking)[/]" if entry.get("blocking") is False else ""
|
|
152
157
|
grid.add_row(
|
|
153
158
|
marker,
|
|
154
159
|
f"[bold]{key}[/]",
|
|
155
160
|
str(entry.get("repo") or "-"),
|
|
156
161
|
f"[{style}]{status or '-'}[/]",
|
|
157
|
-
|
|
162
|
+
key_runs(step_depends(entry)),
|
|
163
|
+
step_title(entry, width) + optional,
|
|
158
164
|
)
|
|
159
165
|
console.print(grid)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evo_cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.30.0
|
|
4
4
|
Summary: Evolution CLI - a developer toolbox for setting up dev machines
|
|
5
5
|
Author: maycuatroi
|
|
6
6
|
Project-URL: Homepage, https://github.com/maycuatroi/evo-cli
|
|
@@ -415,7 +415,9 @@ evo harness serve # dashboard on http://127.0.0.1:8788
|
|
|
415
415
|
evo harness repos # repos in the manifest, with branch and dirty state
|
|
416
416
|
evo harness seams # contract seams; --graph for the owner -> consumer DAG
|
|
417
417
|
evo harness plans # progress across every exec-plan
|
|
418
|
-
evo harness show <plan>
|
|
418
|
+
evo harness show <plan> # every section, open questions with status and blocking
|
|
419
|
+
evo harness show <plan> --step 3 # one step in full: what, verify, note, acceptance, evidence
|
|
420
|
+
evo harness step <plan> --no-input # the step board: repo, status, depends_on, title
|
|
419
421
|
evo harness check <plan> [--fetch] # what the plan claims vs what git says
|
|
420
422
|
evo harness graph <plan>:steps # the same DAG as an adjacency list
|
|
421
423
|
evo harness clone # clone every declared repo into its declared path
|